FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour search a word on a field string RESOLVED !
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
search a word on a field string RESOLVED !
Posted: Wed Apr 25, 2018 09:38 AM

I have an archivio have field "TAGS "cr 200

sample : "Computer; Portatile; apparecchi per la cucina;"

from another archive I select a field cTopic:= "computer"
and I must search the word "computer" into the first archive on all records

and I wish show only the records having on "eti" the word "computer"

How I must make ?

I try with

OrdScope(0, { || UPPER(ctopic) $ inv->TAGS })
OrdScope(1, { || UPPER(ctopic) $ inv->TAGS })

but not run well

any solution ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: search a word
Posted: Wed Apr 25, 2018 10:04 AM

SELECT INV
SET FILTER TO UPPER( cTopic ) $ FIELD->TAGS
GO TOP

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word
Posted: Wed Apr 25, 2018 10:15 AM

not good sorry
it not search any record but on archive there is

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: search a word
Posted: Wed Apr 25, 2018 10:07 PM
nageswaragunupudi wrote:SELECT INV
SET FILTER TO UPPER( cTopic ) $ FIELD->TAGS
GO TOP


Is the text in FIELD->TAGS in upper case? Otherwise
Code (fw): Select all Collapse
SELECT INV
SET FILTER TO UPPER( cTopic ) $ upper(FIELD->TAGS)
GO TOP
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word on a field string
Posted: Wed Apr 25, 2018 10:36 PM
Sorry not work

I open this archive


and select one for a sample the first record "Computer" Now I wish search on Inventario.dbf and on BiTags field if there is the word selected "Computer"
as you wrote I try with

SELECT INV
SET FILTER TO UPPER( cTopic ) $ FIELD->TAGS
GO TOP
or

SELECT INV
SET FILTER TO UPPER( cTopic ) $ upper(FIELD->TAGS)
GO TOP
then open the xbrowse

and I not see any record

But on archive inventario.dbf there are some record have the word "Computer" on that field as you can see here



it must show the 1,3,4,5 record instead nothing

Why Happen this ... where I make error ?

can I send you a test ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: search a word on a field string
Posted: Thu Apr 26, 2018 05:50 AM

Silvio,

Just to be sure, what is the tame of the table name with the field 'cTtopic' (first database), and what is the one with the field 'Tags' with the text "Computer; Portatile; apparecchi per la cucina;"

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word on a field string
Posted: Thu Apr 26, 2018 07:01 AM

write to me pls
silvio[dot]falconi[at]gmail[dot]com
I can send you a test

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word on a field string
Posted: Thu Apr 26, 2018 09:54 PM

I trying also with
cMaMateria:="Computer"

    Do while .not. be->(eof())
          cstring:= alltrim(BE->BITAGS)
    if  alltrim(cMaMateria+";")  $ cstring
      aadd(  aRecord,  str(BE->( RecNo() ))  )
   Endif
        ? cstring
     BE->(Dbskip())
  Enddo

  xbrowser aRecord

not found any records ... why ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word on a field string
Posted: Fri Apr 27, 2018 08:40 AM

I tried also with

SET FILTER TO at(UPPER( cMaMateria ), UPPER( BE->BITAGS)) >0

but not work

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: search a word on a field string
Posted: Fri Apr 27, 2018 09:25 AM
Now I tried with EMAGDBU as you can see here and the command RUN OK



perhaps I found the error ...grrrrrrrrr alltrim() sorry :-) :-) :-) :-) :-) :-) :-) :-)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion