List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:January 21 2004 8:48pm
Subject:Re: char count
View as plain text  
In the last episode (Jan 21), Steve Edberg said:
> At 12:17 PM -0600 1/21/04, Joseph S Brunzelle wrote:
> > I'm try to write a query that will return the number of times a
> > specified character appears in a string (I want known how many
> > times the character "M" appears), but I cannot seem to figure out
> > how to do that.
> 
> To use the counts on a regular basis, it's probably easier to count
> them when you insert or update the record, and store those values in
> a separate column. That's what I ended up doing on a few genetics
> databases I was working on, anyway -

You could also write a UDF to do it, which will be faster than the
replace() idea, but requires you to write C.

-- 
	Dan Nelson
	dnelson@stripped
Thread
char countJoseph S Brunzelle21 Jan
  • Re: char countSteve Edberg21 Jan
    • Re: char countDan Nelson21 Jan