| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Mark Mitchell <mark(at)lapcrew(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Underscores in column names |
| Date: | 2003-03-07 17:08:19 |
| Message-ID: | 958.1047056899@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-03-07 17:13:14 | Re: Hex Integer Input |
| Previous Message | Achilleus Mantzios | 2003-03-07 17:03:01 | Re: Help on indexing timestamps |