You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql_json_query/populate_ssd_api_data_staging_2016.sql
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -713,7 +713,7 @@ RawPayloads AS (
713
713
JOIN EligibleBySpec elig ONelig.pers_person_id=p.pers_person_id-- either unborn, or 26th bday falls on or after @ea_cohort_window_start (deceased not filtered)
714
714
JOIN SpecInclusion si ONsi.person_id=p.pers_person_id-- appearing in ActiveReferral, WaitingAssessment, CIN plan, CP plan, LAC, Care leavers 16 to 25, Disabled
715
715
716
-
/* Disabilities array, return NULL when no codes */
716
+
/* Disabilities array, return NULL when no codes, truncate codes to 4 chars max*/
717
717
OUTERAPPLY (
718
718
SELECT
719
719
CASE
@@ -729,12 +729,12 @@ RawPayloads AS (
729
729
SELECTN','+QUOTENAME(u.code, '"')
730
730
FROM (
731
731
SELECTTOP (12)
732
-
UPPER(LTRIM(RTRIM(d2.disa_disability_code))) AS code
732
+
LEFT(UPPER(LTRIM(RTRIM(d2.disa_disability_code))), 4) AS code
0 commit comments