how to count string occurrence in column

From: "Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il>
To: "postgres" <pgsql-general(at)postgresql(dot)org>
Subject: how to count string occurrence in column
Date: 2002-08-27 09:38:52
Message-ID: 006b01c24dad$8e34c860$aa0f5ac2@canaan.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

How can i count how many time a string 'hello' appear in a column.

for example.

select *, count_num_of_string(column, 'hello') from table;

Cheer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Gibbs 2002-08-27 09:42:22 Re: Cast Type
Previous Message Lee Kindness 2002-08-27 09:35:59 Re: how to count string occurrence in column