Skip to content

Invalid SQL statement selection and invalid syntax errors when THEN is used #453

@SanjulaGanepola

Description

@SanjulaGanepola

Attempting to run the following statement fails as the selection range becomes invalid
Image

CREATE MASK mask_ccnum
  ON customers
  FOR COLUMN cc_number
  RETURN
    CASE
      WHEN cc_number IS NULL THEN NULL
      ELSE
        'XXXX-XXXX-XXXX-' || SUBSTR(cc_number, CHAR_LENGTH(cc_number) - 3, 4)
    END
  ENABLE;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions