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
This following formatted case statement is difficult to read. May I suggest that function parameters have their own lines when the parameter list gets "too long", and all the CASE clauses align vertically.
Instead of outputting
(
CASE
WHEN (("v.$string") IS NULL)
OR (("v.$string") = '')
THEN NULL
ELSE SUBSTR("v.$string", CASE
WHEN ((1) IS NULL)
OR ((max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4)))) IS NULL)
THEN NULL
ELSE (1) + (max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4))))
END, (LENGTH("v.$string")) - (max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4)))))
END
) = ('test')
ensure multi-line CASE statements have the clauses aligned,
(
CASE
WHEN (("v.$string") IS NULL) OR (("v.$string") = '')
THEN NULL
ELSE
SUBSTR(
"v.$string"
,CASE
WHEN ((1) IS NULL) OR ((max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4)))) IS NULL)
THEN NULL
ELSE (1) + (max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4))))
END
,(LENGTH("v.$string")) - (max(0, min(LENGTH("v.$string"), (LENGTH("v.$string")) - (4))))
)
END
) = ('test')
thank you
The text was updated successfully, but these errors were encountered:
This following formatted
case
statement is difficult to read. May I suggest that function parameters have their own lines when the parameter list gets "too long", and all theCASE
clauses align vertically.Instead of outputting
ensure multi-line CASE statements have the clauses aligned,
thank you
The text was updated successfully, but these errors were encountered: