Re: how to count string occurrence in column

Поиск
Список
Период
Сортировка
От Ben-Nes Michael
Тема Re: how to count string occurrence in column
Дата
Msg-id 002001c24de3$960944e0$aa0f5ac2@canaan.co.il
обсуждение исходный текст
Ответ на Re: how to count string occurrence in column  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Ответы Re: how to count string occurrence in column  (Lee Kindness <lkindness@csl.co.uk>)
Список pgsql-general
yes, this is what i want.

but this dont work :(
pg - 7.1.3

> > Actually i'm sure the original poster is after something like:
> >
> >  SELECT count('qwerty qwert qwertyffff fff qq', 'qwerty');
> >   count
> >  --------
> >        2
> >  (1 row)
> >
> > But off the top of my head i cannot think of a suitable standard
> > function...
>
> Woops, posted too quick. Maybe my posting doesn't answer the original
> question:
>
> column1
> row 1   'test test'
> row 2   'test'
>
> My statement would count 2. Maybe the OP would want 3. In that case, I
> think you'll have to write some code that counts substring occurences.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pl/pgsql create table
Следующее
От: Neil Conway
Дата:
Сообщение: Re: pl/pgsql create table