You are here: Re: Counting the occurence of a string ... « MsSQL Server « IT news, forums, messages
Re: Counting the occurence of a string ...

Posted by Roy Harvey on 08/27/06 12:54

If tblStrings.[strSearch] is defined as fixed length (char) instead of
varying length (varchar) that would cause problems. Or if trailing
blanks were stored in a varchar column. Try using
RTRIM(tblStrings.[strSearch]) instead.

Roy Harvey
Beacon Falls, CT

On 27 Aug 2006 01:00:04 -0700, "DaFerg" <dave@myalarm.com> wrote:

>Hi ...
>I have a weblog database where I want to count the occurences of a
>table of string values that appear in all the urls viewed.
>
>My tblWebLog as a field that contains the url ...
>tblWebLog.[cs-uri-stem]
>
>I have another table ... tblStrings ... that has a field [strSearch]
>for a string value and an integer field [intViewCount] to count the
>occurence of the string in tblWebLog.[cs-uri-stem]
>
>I've been trying ...
>
>Update tblStrings
>Set [intViewCount] = (Select Count(*) From tblWebLog Where
>[cs-uri-stem] Like '%_' + tblStrings.[strSearch] + '.htm%')
>
>... but it doesn't fly and I'm stumped. Any thoughts?
>
>Cheers.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация