Subject Re: Search in string
From Patrick <pq@caiway.nl>
Date Wed, 18 Apr 2018 05:00:44 -0400
Newsgroups dbase.getting-started

Sorry Ken, both commands don't work, I use dBase 5 for dbdos.
May I send you a little fee via PayPal for another command, I really need this to work please.



Ken Mayer Wrote:

> On 4/17/2018 8:45 AM, Ken Mayer wrote:
> > On 4/17/2018 8:15 AM, Patrick wrote:
> >> Dear folks, I know how to count a specific field for a value for example:
> >>
> >> count for name=[pinterminal]
> >>
> >> But what if the word pinterminal is in different positions in that
> >> field? How do I count then? I know the character $ is used, but how?
> >>
> >> Many thanks for answering :)
> >>
> >
> > count for name $ pinterminal
> >
> > // note that this is usually case-sensitive, so:
> >
> > count for lower(name) $ lower( pinterminal )
> >
> > This is assuming you are using dBL. If you are using SQL:
> >
> > select count(pinterminal) where pinterminal like "%name%"
> >
> > (The above is off the top of my head, not having your data, etc.)
>
> Just realized, if the variable is pinterminal, I got those backward:
>
> count for "pinterminal" $ name
>
> (Not sure why you're using square brackets ...)
>
> Ken
>
>
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm