Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: DEREK DODOO
  Where is DEREK DODOO?
 READING, UK
 United Kingdom
 DEREK DODOO
 Tags
Subject: RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS
Thread ID: 189266 Message ID: 189275 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Thursday, August 14, 2008 8:34:19 AM         
   


> >
> >
> > 
> > CREATE CURSOR qual(qual1 c(10),qual2 c(10),qual3 c(10))
> > INSERT INTO qual values("qual1","qual2","qual3")
> > INSERT INTO qual values("11","22","qua33")
> > INSERT INTO qual values("surinder","singh","thakur")
> > INSERT INTO qual values("singh","badhotra","ajay")
> > 
> > lcText = INPUTBOX("Enter value to search")
> > 
> > SELECT * FROM qual WHERE lcText$qual1 OR lcText$qual2 OR lcText$qual3
> > 

> >
> > -----------------------------------------------------------------------------------------------
> > Regards
> > Surinder Singh
> > Email: sur200@indiatimes.com
> > Check my blog for details: http://weblogs.foxite.com/sur200
> > ----------------------------------------------------------------------------------------
> > *If you understand what you're doing, then you're not learning anything.
>
> Please explain the effect of using '$' and "%".

both are same if you use % on both sides of the text
e.g.
%sur% - it will search for "sur" anywhere in the string (where you want to search).

and the result will be same for both % and $ in this case.

but will differ if you will use % on any side of the text.


e.g.
%sur - means search text that starts with any but ends with "sur"
sur% - means search text that starts with "sur" but ends with any
-----------------------------------------------------------------------------------------------
Regards
Surinder Singh
Email: sur200@indiatimes.com
Check my blog for details: http://weblogs.foxite.com/sur200
----------------------------------------------------------------------------------------
*If you understand what you're doing, then you're not learning anything.

ENTIRE THREAD

SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by DEREK DODOO @ 8/14/2008 7:34:40 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by surinder singh @ 8/14/2008 7:47:33 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by DEREK DODOO @ 8/14/2008 8:12:29 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by surinder singh @ 8/14/2008 8:34:19 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Borislav Borissov @ 8/14/2008 8:17:10 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by DEREK DODOO @ 8/14/2008 8:48:23 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Borislav Borissov @ 8/14/2008 8:57:28 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by DEREK DODOO @ 8/14/2008 9:22:01 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Borislav Borissov @ 8/14/2008 9:35:09 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by DEREK DODOO @ 8/16/2008 2:37:29 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Stefan Wuebbe @ 8/16/2008 8:55:49 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Jim Booth @ 8/16/2008 7:09:36 AM
RE: SEARCH FOR AN ITEM FROM A NO. OF FIELDS Posted by Anders Altberg @ 8/16/2008 6:20:38 PM