emailcampaigns log {ts '2025-06-26 08:28:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( ( [runDate] >= '2025-06-15T00:00:00' ) and ( [runDate] <= '2025-06-21T00:00:00' ) ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 20 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:28:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:28:24'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:11'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( ( [runDate] >= '2025-06-15T00:00:00' ) and ( [runDate] <= '2025-06-21T00:00:00' ) ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 20 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:13'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:28'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:28'} SQL {ts '2025-06-26 08:29:28'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:28'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23042 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:38'} SQL {ts '2025-06-26 08:29:38'} SQL {ts '2025-06-26 08:29:38'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:39'} SQL {ts '2025-06-26 08:29:39'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:41'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:41'} SQL {ts '2025-06-26 08:29:41'} SQL {ts '2025-06-26 08:29:41'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23042 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:29:43'} SQL {ts '2025-06-26 08:29:43'} SQL {ts '2025-06-26 08:29:43'} SQL {ts '2025-06-26 08:29:43'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23042 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:45'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19779 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18294 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22496 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20196 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20484 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21092 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21160 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18218 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21867 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22049 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22550 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22901 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19284 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20970 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20971 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18413 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16923 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20641 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18698 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19716 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18562 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18644 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18693 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19072 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18767 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20597 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18161 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19095 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19552 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19906 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21491 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23028 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21495 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20021 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20037 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20121 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20232 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20346 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:51'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20428 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20466 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20527 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19725 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19761 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20572 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20777 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20900 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20982 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21015 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21020 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21154 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21033 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20607 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21220 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21276 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21240 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21286 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21298 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21170 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21263 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21430 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21437 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21453 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21525 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21614 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21631 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21662 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21632 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21686 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21836 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21370 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21395 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21380 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20031 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19217 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19403 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19393 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19672 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19608 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22106 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20799 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21295 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19620 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20029 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19581 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19302 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:52'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19304 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19264 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21898 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20891 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19145 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19147 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22322 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22308 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22361 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22429 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22460 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22164 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19784 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17714 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18476 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18645 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18646 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18586 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18593 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17708 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18079 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18254 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20131 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21179 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21347 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20629 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20675 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20740 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21459 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20782 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21373 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20050 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20916 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20137 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20268 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21061 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21139 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20348 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21825 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22098 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22128 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22222 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21651 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21897 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19926 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:53'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19611 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21812 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20129 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20208 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20320 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20262 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20489 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20261 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20325 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18863 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18846 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20886 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19744 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20201 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19089 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20827 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19493 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21266 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21060 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21126 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20705 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20000 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19526 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20851 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20666 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20596 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20337 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19771 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19773 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19936 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19929 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19772 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19655 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19757 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19840 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21369 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19755 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20580 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20628 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19759 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20806 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20811 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19909 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20116 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20248 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20132 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20364 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20376 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20392 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20513 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22252 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22184 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19159 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19781 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21014 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19738 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18766 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19228 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20940 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22085 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19927 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20068 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20834 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22091 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21168 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19108 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19787 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19207 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19067 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19066 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20702 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19712 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21529 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20532 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20387 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20238 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20994 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20230 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19564 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19446 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20791 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19517 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19735 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22048 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20638 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22130 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21356 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20692 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22153 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22219 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21414 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22250 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21456 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23024 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21439 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22338 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22349 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22407 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22424 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21569 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:55'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19683 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21649 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22509 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21681 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21736 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21750 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21763 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22685 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21841 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21868 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22741 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22728 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22001 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21974 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22918 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19998 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20786 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19441 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21727 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19084 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19083 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22183 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22753 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22358 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22589 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22833 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21643 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21769 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20578 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21166 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21133 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19842 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21134 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18845 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19406 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21292 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20344 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21034 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21835 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21306 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21122 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20097 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20874 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20595 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21176 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20930 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20008 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20613 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:56'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22745 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18984 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19006 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19749 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20310 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20311 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20330 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20333 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20332 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21381 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20958 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19142 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19922 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19664 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20107 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20363 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20211 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20377 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20398 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20913 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20600 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21174 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21808 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20119 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19144 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22215 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22386 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18542 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20368 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20400 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20457 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20676 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21856 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21571 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21588 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20191 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19088 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20054 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19907 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19694 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20274 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19839 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21366 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18709 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19751 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19826 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20778 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19883 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:57'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20022 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20182 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20355 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19889 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18789 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19080 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21679 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20696 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19421 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20604 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21433 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18844 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22388 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20422 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:58'} SQL {ts '2025-06-26 08:31:58'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21385 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23031 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21027 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22568 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21336 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21454 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21577 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21200 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21265 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21490 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19574 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17768 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19221 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18924 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19512 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20479 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20246 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19715 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18592 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19853 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20873 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22775 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22879 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20357 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21189 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21188 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22748 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20331 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20316 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19817 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20271 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20451 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20946 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21136 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18925 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21367 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18972 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20449 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22002 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19536 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19539 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18979 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20329 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20309 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20209 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21073 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:31:59'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19657 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18218 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18294 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22496 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21092 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19779 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20484 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20196 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22550 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21867 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22049 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22901 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21160 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20970 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20971 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19284 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:00'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18413 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16923 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20641 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19716 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18698 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18562 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18644 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19072 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18693 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18767 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20597 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18161 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19657 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21292 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21034 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20344 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20958 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21136 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21154 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20607 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21170 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21174 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18476 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18646 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18645 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18586 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19738 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20296 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18766 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20479 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19715 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21133 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21166 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20596 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20337 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21134 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18845 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19853 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21240 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21276 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21286 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21430 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21453 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21525 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21614 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21631 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21632 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21662 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21686 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21808 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21836 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21370 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21380 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20119 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21395 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20031 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19217 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19403 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19393 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19608 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22106 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20799 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21295 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18844 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20029 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19581 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19683 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19302 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19304 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19264 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21898 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19145 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19147 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22322 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22215 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22308 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22429 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22361 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22164 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19784 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19922 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20037 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20121 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19664 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20232 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20271 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20363 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20346 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20377 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20451 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20466 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17714 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20297 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23006 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18593 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18542 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17708 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18079 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20131 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20368 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20400 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21179 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20457 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20629 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21347 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20675 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20740 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21459 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20782 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20050 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20916 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20137 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21061 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20268 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20348 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21139 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20676 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:02'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21825 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21856 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22098 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22128 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22222 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21651 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21897 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19926 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19611 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21812 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20129 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21571 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20320 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20208 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20489 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20261 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20262 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20325 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18863 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18846 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20886 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19744 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20191 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19089 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19088 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19694 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21266 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21060 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20000 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20851 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19552 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19755 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20580 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19826 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20778 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20806 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19883 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20811 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19909 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20116 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20132 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20209 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20182 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20527 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19725 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20777 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20900 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20946 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20982 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21020 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21015 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20600 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21033 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19936 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19929 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20392 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20376 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20513 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22184 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22252 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19159 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19889 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19781 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21014 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19228 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18789 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20940 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18972 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22085 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:03'} SQL {ts '2025-06-26 08:32:03'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19927 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19080 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21679 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20834 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22091 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21168 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19108 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19787 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20702 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19067 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20696 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21529 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20238 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20994 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20230 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19421 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19564 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19446 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20791 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19517 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19735 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20449 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22048 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20604 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20638 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22130 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21356 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22153 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20692 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22219 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22250 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21456 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21439 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22338 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22349 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22388 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22424 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22407 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21569 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21649 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22509 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21681 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21736 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21763 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21750 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22685 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21841 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22728 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22741 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22001 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21974 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22918 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19998 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20786 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19441 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21727 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19084 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19083 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20422 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22183 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22753 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22358 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22589 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22833 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21769 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21643 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20578 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21385 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21336 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21027 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22568 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21454 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21577 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21200 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21835 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21306 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21122 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20097 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21176 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20874 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20595 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20873 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20613 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22879 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21491 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21495 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22745 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20357 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21188 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22748 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18984 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19006 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18979 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20329 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20311 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20330 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20332 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20331 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20333 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21381 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18925 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19574 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19536 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17768 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19221 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18924 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21073 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20246 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19842 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21220 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21263 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21437 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20891 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19144 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22386 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19142 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19817 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20021 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20107 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20211 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20428 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19095 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18254 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21373 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21588 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20201 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20827 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19493 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20054 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19907 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21126 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:06'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20705 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19526 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20666 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19906 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19751 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20628 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19759 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20022 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19761 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20572 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20913 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19771 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19773 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19772 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19840 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19757 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19839 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21369 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20274 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21367 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21366 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18709 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20248 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20355 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20364 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20068 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19207 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19066 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19712 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20532 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22002 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21414 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21433 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21868 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21265 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20930 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22775 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21189 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19749 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20309 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20310 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19539 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19512 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18592 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19406 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19672 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19620 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22460 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20398 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19655 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20387 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20008 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20316 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21490 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21298 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:07'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18218 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19779 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18294 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22496 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20196 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:15'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21092 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21867 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22550 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20970 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20971 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22049 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21160 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20484 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22901 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18413 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19284 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19852 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16923 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20641 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18698 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19716 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18644 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18562 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19072 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18693 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18767 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20597 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18161 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20900 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20913 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20946 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20982 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21220 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21240 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21263 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21276 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21286 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20131 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21679 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22091 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21168 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20607 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21170 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21174 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19657 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19840 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19839 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21369 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20274 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20197 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21366 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21367 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18709 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18925 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21490 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19536 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19574 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19539 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17768 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21298 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21430 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21437 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21525 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21576 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21614 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21631 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21632 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21656 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21662 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21318 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21686 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21808 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21836 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21902 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21370 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21380 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21395 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20119 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20031 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19403 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19217 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19393 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19472 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19672 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19608 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22106 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22111 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20799 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19620 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19911 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21295 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18844 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20029 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19682 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19683 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19302 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19304 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19264 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21898 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19145 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19144 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22322 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22215 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22386 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22429 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22460 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22093 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22164 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19784 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19095 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19293 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17762 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17714 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18473 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18476 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18586 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18593 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18542 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17708 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17663 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17707 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18082 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18254 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18079 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19221 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20140 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18924 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19075 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21073 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19512 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20479 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19848 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19715 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18592 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 16878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21133 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21166 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21134 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19842 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18845 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20112 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19853 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19406 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21292 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20344 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20950 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20958 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20959 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20556 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20368 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20400 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21223 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20480 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20740 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20050 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20916 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20137 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20124 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20268 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20269 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21061 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20273 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:17'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21099 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20348 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20676 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22102 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21825 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21856 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22222 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22289 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21651 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21764 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19926 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:18'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19997 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19611 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19609 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20208 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20320 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21588 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20489 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20262 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20325 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19152 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18863 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18846 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19744 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19743 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19850 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20201 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20202 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20191 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19088 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19829 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18957 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19493 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19733 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21094 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21266 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21060 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20705 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20887 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20401 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21673 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19526 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20000 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20666 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20851 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19557 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20110 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18914 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20471 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19906 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19552 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20580 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20623 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20628 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19742 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20739 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19816 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20778 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19826 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20806 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19883 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20811 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19919 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19909 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19988 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20022 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20069 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20116 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20132 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20182 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20209 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20248 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20279 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20355 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20474 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20513 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20528 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20544 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22252 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19921 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19781 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21014 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19738 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21423 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19468 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19598 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19228 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20452 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18766 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18789 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18790 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20940 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18795 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22085 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18917 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19142 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19408 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19797 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19817 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19828 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19843 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20037 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20157 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19664 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20232 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20271 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20301 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20346 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20354 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19687 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20363 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20398 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20466 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20428 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20560 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20563 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21626 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21667 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18701 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19927 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:19'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20068 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19080 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20837 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20834 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19787 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19108 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19023 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19087 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19305 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19207 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19204 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20587 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19067 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19066 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18993 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20702 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20696 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22905 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19712 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22838 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21529 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22396 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19519 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19730 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20150 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20387 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20445 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20522 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20247 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20238 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20303 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20994 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20230 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19402 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19605 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19606 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19634 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19640 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19409 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19421 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19564 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19566 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19567 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19446 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20791 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19517 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19735 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20450 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20353 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20461 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22002 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20449 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22025 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20582 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22048 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20604 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22078 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22130 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21356 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22153 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20692 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22181 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21383 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20711 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22216 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22219 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22231 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20734 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21433 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22250 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21470 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21456 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21485 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22324 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22338 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21439 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21504 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20854 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22349 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20871 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21520 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22372 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20855 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21530 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22388 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22407 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21569 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21612 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22478 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21659 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21649 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22509 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22540 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22583 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21681 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21722 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22625 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22639 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21763 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21798 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22674 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22859 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21841 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21167 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21868 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22741 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21880 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22752 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21890 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21947 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20482 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21955 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21961 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20533 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22001 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21974 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20548 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22819 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20516 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22934 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22965 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19899 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20624 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19998 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19713 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20786 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18776 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19441 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21727 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19083 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20422 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21962 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21814 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:20'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22076 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22183 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22007 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21518 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22342 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21086 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21794 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21280 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21385 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22175 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21336 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21027 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22568 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21627 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22475 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21017 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21944 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20732 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21454 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20904 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21577 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22419 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21265 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22689 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21200 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22688 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21835 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22680 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21122 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21306 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21123 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20010 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20872 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20097 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21176 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20595 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20930 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20875 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22081 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21565 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20873 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21177 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20008 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20877 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21989 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21096 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21101 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20011 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20876 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21178 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21802 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22619 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18171 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17670 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17671 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22830 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22831 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21824 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21546 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21823 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22775 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22879 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21125 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21720 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20678 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21499 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21498 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21491 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21495 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22665 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22745 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22669 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20357 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21545 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21188 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22748 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18943 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21394 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18903 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22019 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19761 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20572 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18005 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20724 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19813 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20596 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20337 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21118 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19018 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17783 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17785 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19937 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19864 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19929 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19936 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19928 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19771 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19773 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19757 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19770 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19772 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19774 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19655 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20754 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20777 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20737 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20793 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20832 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20866 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21033 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20600 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21015 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21053 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21074 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21090 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21136 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19006 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21146 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21117 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19057 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19584 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19749 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19045 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20328 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20310 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20311 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20329 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20330 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20313 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20314 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20333 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20316 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20315 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20334 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21381 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20288 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20297 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20291 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23006 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21203 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20296 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21213 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19531 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19521 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21465 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21481 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21746 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19391 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21555 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19300 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22163 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19581 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19718 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19719 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20800 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20891 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22162 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19149 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22308 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22345 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22361 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22039 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18559 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17865 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18645 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18658 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18660 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18551 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18497 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18684 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 17652 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19103 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20246 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20113 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19622 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21034 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20956 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21323 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20700 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20601 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21148 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19317 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21179 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21285 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20457 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20629 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20602 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21319 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21347 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20675 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21373 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21459 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21523 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20782 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19967 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20858 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20949 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21139 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21026 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19756 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19976 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20729 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22004 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21882 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21963 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21953 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22128 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22098 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21535 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21585 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21621 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21809 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20860 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21897 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20990 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20206 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19954 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21812 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21969 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20158 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20212 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20129 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21571 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20321 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21549 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20261 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18960 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18862 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20886 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21968 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18948 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20503 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20205 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19089 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19553 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20054 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20827 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19907 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19694 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19966 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18915 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18939 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21126 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18878 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19547 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19755 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19751 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20561 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19759 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19780 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20726 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20270 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20364 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20376 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20392 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20412 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20447 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22184 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19159 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18801 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19115 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19427 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19889 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18972 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19114 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18964 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19463 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19884 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19922 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20021 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20107 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20121 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20135 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20211 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20377 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20307 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20451 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20500 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20527 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19706 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22815 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19725 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21615 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20532 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18703 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19857 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20822 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19501 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19558 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19633 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21399 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20210 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21414 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20760 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20792 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22635 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21750 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22728 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21870 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22885 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22796 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22918 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22255 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22003 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22043 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21952 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22483 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22753 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22420 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22704 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22358 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22589 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22642 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22833 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22810 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22888 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22214 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21896 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21575 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21769 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21573 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21699 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21643 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21847 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22438 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20156 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22721 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20578 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20534 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22690 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20874 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19938 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21020 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21154 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18984 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21443 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18979 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20287 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20290 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20309 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20312 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20332 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21453 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18646 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19147 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19299 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19603 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19910 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20599 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20638 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20804 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21616 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22424 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21668 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21736 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22685 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22849 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21861 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20077 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19071 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 19084 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20613 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22951 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21189 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21723 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18996 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20331 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 20335 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21104 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 21193 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22009 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 08:32:23'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22462 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 09:46:34'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:40:28'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:40:47'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 22712 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:47:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:47:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:48:16'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:58:04'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 15:59:05'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23044 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 19:30:22'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where ( 1 = 1 ) ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 19:30:54'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 19:31:14'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23040 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 19:31:21'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 23041 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2025-06-26 19:33:01'} SQL declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with data as ( select e.campaignId, dbo.fseToken( e.campaignId ) as campaignTk, e.name as campaignName, e.campaignType, e.emailSubject, e.emailFromDisplay, e.emailFrom, cast( case when coalesce( e.scheduled, 'N' ) = 'Y' then 1 else 0 end as bit ) scheduled, e.useInternalContact, e.runDate, e.includeUnsubscribe, e.statusCd, e.timeReminded, e.timeStarted, e.timeCompleted, e.creator_typ, e.message1Default, e.message2Default, e.lastUpdatedDate, e.createDate, e.emailManagerVersion, e.emailEditorType, e.eai_batchId, dbo.fseToken( e.eai_batchId ) as eai_batchTk, e.creator_member_id, e.targetListId, e.updateUserId, e.responderListId, e.formResponderListId, case when e.statusCd = 'PEN' then 'Pending' when e.statusCd = 'RUN' then 'Running' when e.statusCd = 'ABT' then 'Aborted' when e.statusCd = 'SUC' then 'Executed' else 'Unknown' end as status, case when e.scheduled = 'N' then 'Not Scheduled' else case when e.statusCd = 'PEN' then 'Scheduled for Future Date/Time' when e.statusCd = 'RUN' then 'Currently Running' when e.statusCd = 'ABT' then 'Executed Unsuccessfuly' when e.statusCd = 'SUC' then 'Executed Successfully' else 'Unknown' end end as statusLong, m.campaignId gtmCampaignId, m.campaignName gtmCampaignName , e.emailMessage , e.emailMessageEditorContent , ( SELECT count(*) FROM tbl_EML_CampaignRecipients r with (nolock) WHERE r.CampaignID = e.campaignId ) as recipientCount , ( select count(*) from tbl_EML_RecipientClicks rc with (nolock) inner join tbl_EML_CampaignRecipients r with (nolock) on r.RecipientID = rc.RecipientID where rc.ignoreClick = 'n' and r.campaignId = e.campaignId ) as clicks , ( select count(*) from tbl_eml_campaignunsubscribes u with (nolock) where u.campaignid = e.campaignId and u.ownerid = e.ownerId and u.ownertype = e.fsl_tablecode ) as unsubscribes , ( select count(*) from tbl_EML_CampaignRecipients cr with (nolock) where cr.campaignId = e.campaignId and cr.beaconCount >= 1 ) as opens , case when e.eai_batchId is not null then ( select b.status, b.message, b.batchTime, b.statusTime from tbl_EAI_InboundBatches b with (nolock) where b.ownerId = e.ownerId and b.ownerType = e.fsl_tablecode and b.batchId = e.eai_batchId for json auto, include_null_values, without_array_wrapper ) else cast( null as varchar ) end as batchStatus, cast( case when e.emailMessage like '%UNSUBSCRIBE-LINK-HERE%' then 1 else 0 end as bit ) containsUnsubscribe from tbl_EML_Campaign e with (nolock) left outer join tbl_GTM_Campaigns m with (nolock) on m.ownerId = e.ownerId and m.ownerType = e.fsl_tablecode and m.campaignId = e.gtmCampaignId where e.ownerId = @ownerId and e.fsl_tablecode = @ownerType and e.emailManagerVersion = '2.0' and e.emailEditorType = 'BEE' ) , data_mappedData as ( select * from data ) , data_preData as ( select * from data_mappedData with (nolock) where [campaignId] = 18805 ) , data_data as ( select * from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by campaignName offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER