Re: Underscores in column names

Поиск
Список
Период
Сортировка
Искать
От
Richard Huxton
Тема
Re: Underscores in column names
Дата
Msg-id
200303071628.11980.dev@archonet.com
Ответ на
Список
Дерево обсуждения
Underscores in column names Mark Mitchell <mark@lapcrew.com>
Re: Underscores in column names Richard Huxton <dev@archonet.com>
Re: Underscores in column names Mark Mitchell <mark@lapcrew.com>
Re: Underscores in column names Tom Lane <tgl@sss.pgh.pa.us>
Hex Integer Input Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: Hex Integer Input Tom Lane <tgl@sss.pgh.pa.us>
Re: Hex Integer Input Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: Hex Integer Input Joe Conway <mail@joeconway.com>
Re: Hex Integer Input Achilleus Mantzios <achill@matrix.gatewaynet.com>
On Friday 07 Mar 2003 3:58 pm, Mark Mitchell wrote:
> I have a underscores in most all of the column names in this database.
> I've ran into a problem where Postgres doesn't like them.
>
> 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"
>
> The column "NA_COLON" is a column that holds the numeric position at
> which the first name ends and the last name begins. If the column name
> does not contain an underscore it works fine. Any suggestions?

Are you sure you don't mean substr() rather than substring()? I think the form 
you're using does a POSIX regexp match and uses the third param as an escape 
character.

--  Richard Huxton

В списке pgsql-sql по дате отправления
От: Andreas Pflug
Дата:
От: Mark Mitchell
Дата:
FAQ