search a word on a field string RESOLVED !

search a word on a field string RESOLVED !

Postby Silvio.Falconi » Wed Apr 25, 2018 9: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 ?
Last edited by Silvio.Falconi on Fri Apr 27, 2018 9:26 am, edited 3 times in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word

Postby nageswaragunupudi » Wed Apr 25, 2018 10:04 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: search a word

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word

Postby Marc Vanzegbroeck » 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: Select all  Expand view
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: search a word on a field string

Postby Silvio.Falconi » Wed Apr 25, 2018 10:36 pm

Sorry not work

I open this archive
Image

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

Image

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word on a field string

Postby Marc Vanzegbroeck » Thu Apr 26, 2018 5: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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: search a word on a field string

Postby Silvio.Falconi » Thu Apr 26, 2018 7: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word on a field string

Postby Silvio.Falconi » Thu Apr 26, 2018 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word on a field string

Postby Silvio.Falconi » Fri Apr 27, 2018 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: search a word on a field string

Postby Silvio.Falconi » Fri Apr 27, 2018 9:25 am

Now I tried with EMAGDBU as you can see here and the command RUN OK

Image

perhaps I found the error ...grrrrrrrrr alltrim() sorry :D :D :D :D :D :D :D :D
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7057
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests