First page Back Continue Last page Image

LOCATE and LENGTH – Metadata for Records

LOCATE(What, Where, Starting Position)

LENGTH(What)

Both of these functions return integers, which can be used in other functions (for example SUBSTRING) and I can embed them to get to additional fields

This is showing me the length of the field in each record

This is showing me the first occurrence of the delimiter ; in the field for each record

The combination of LENGTH, LOCATE and Stacking LOCATE can allow me to parse just about any string with a pattern