Mark Mitchell <mark(at)lapcrew(dot)com> writes:
> SELECT * FROM "NATAB" WHERE
> "NATAB"."NA_LAST_NAME" LIKE 'MITCHELL%' AND
> SUBSTRING("NATAB"."NA_NAME",0,"NATAB"."NA_COLON") LIKE 'MARK%'
> Produces the error : "ESCAPE string must be empty or one character"
This is a datatype issue, not a naming issue. If the second and third
arguments to substring() aren't integers (and no, I don't mean numeric,
nor float, I mean int4), the parser is likely to think you are asking
for the three-text-parameter variant of substring(). Which is
SQL99-style regexps with an alternate escape string.
regards, tom lane