| От | Gregory Seidman |
|---|---|
| Тема | last word in text |
| Дата | |
| Msg-id | 20030115151653.GA19469@cs.brown.edu обсуждение исходный текст |
| Список | pgsql-general |
Is there a function or composition of functions that will retrieve the last word in a text field? I have a table of addresses with arbitrary text for the first field (i.e. to whom it is addressed), and I'd like to do my queries as something like this: SELECT * from Addresses WHERE state = 'CA' ORDER BY lastword(addressee); What I'm missing is the definition/name of the lastword function. Note that I'm not expecting perfect results from this. There will be some weirdness with certain addressees. Nonetheless, it is a reasonable approach. My other option, which is what I'm doing now, is to have a "last" column in the table and have my host language fill it on insertion. It's workable, but it's redundant and overly complex from a data abstraction point of view. --Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера