Re: postgres function

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: postgres function
Дата
Msg-id CAKFQuwaOxgxK1swMLuTLoOFA4k7zv1YxOLExfDjb-70g-OEntg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres function  (Ramesh T <rameshparnanditech@gmail.com>)
Ответы Re: postgres function
Список pgsql-general
On Thu, Oct 15, 2015 at 10:05 AM, Ramesh T <rameshparnanditech@gmail.com> wrote:
'123-987-123' it is not fixed some times it may be '1233-9873-123-098'
as you said it's fixed,

changes the values in middle of the -

sometimes times i need 1233 and 098 or 9873,first position  i'll find direct for second variable we don't know where it's end with -

i.e ,
i need to find second postition of the variable between the '-'
​​ 
 
​While I and others are likely inclined to provide you a working solution to do so you need to state your data and requirement more clearly.​  Given the apparent language dynamic I'd suggest supplying 5-10 example data values along with their expected result.

​Otherwise, regular expressions almost certainly will let you solve your problem (though, like Joe Conway indicated, split_​part may be possible) once you learn how to construct them.  regexp_matches(...) is the access point to using them.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Installing plpython3u