Extract the PL # from PDCMS Charge
if REGEXP_MATCH([Tc Pl#], '^A[0-9]') = true
then REPLACE([Tc Pl#], 'A', '')
else [Tc Pl#]
END
Extract the 'A' from PDCMS charge
REGEXP_EXTRACT([Tc Pl#], '^(A)[0-9]+$')
Show the charge family (ie 220.xx, 120.xx)
IIF(
REGEXP_MATCH(left([TC Without A], 3), '[0-9][0-9][0-9]'),
LEFT([TC Without A], 3), //display if first 3 characters are numbers
[TC Without A] // otherwise display the full charge
)
Check if the charge is violent
iif(
REGEXP_MATCH([Top Charge Type], 'FV'),
'Violent', 'Non-Violent')