flexFieldLookupValues log {ts '2024-10-03 15:38:50'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1812 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:41:03'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:42:54'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:43:31'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:43:44'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:43:49'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:43:57'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:17'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:23'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:30'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:38'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:44'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:50'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:53'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:44:59'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:05'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:08'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:09'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:13'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:17'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:23'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:58'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:45:58'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:00'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:01'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:29'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:32'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:37'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:40'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:41'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:42'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:42'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:43'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:44'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:46'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:47'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:47'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Operator' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:46:50'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1929 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Distributor' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:48:58'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1812 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where [text] = 'Owner' ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:51:33'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1812 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:51:38'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1812 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( [text] = 'Sales' ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:51:38'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1812 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( [text] = 'Sales' ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-03 15:53:24'} RAW declare @ownerId int = 387 ; declare @ownerType varchar(3) = 'BRO' ; with rawData as ( select 'WRK' as domain, f.fieldId, upper( rtrim( ltrim( f.name ))) name, upper( rtrim( ltrim( f.category ))) category, fl.selectionValue as [value], fl.selectionLabel as [text], fl.sortRank, sourceFieldId [sourceFieldId], sourceFieldOp [sourceFieldOp], sourceFieldValue [sourceFieldValue] from tbl_WRK_Fields f with (nolock) inner join tbl_WRK_FieldLookups fl with (nolock) on fl.ownerId = f.ownerId and fl.ownerType = f.ownerType and fl.fieldName = f.name left outer join tbl_WRK_Conditions c with (nolock) on c.ownerId = fl.ownerId and c.ownerType = fl.ownerType and c.targetType = 'L' and c.targetKey = cast( f.fieldId as varchar ) + ':' + fl.selectionValue where f.ownerId = @ownerId and f.ownerType = @ownerType and f.fieldId = 1934 ) , data as ( select *, category + '_' + name as fieldName from rawData where 1 = 1 and category = 'F100C' ) , data_preData as ( select * from data where ( 1 = 1 ) ) , data_data as ( select * , count(*) over() as fseRowCount from data_preData ) , data_return as ( select * from data_data where 1 = 1 order by sortRank,value offset 0 rows fetch next 10000000 rows only ) , data_result as ( select ( select count(*) from data_data ) as totalCount, ( select * from data_return for json auto, include_null_values ) as data ) select * from data_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER