Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Contains
Message
From
07/04/2001 10:20:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/04/2001 09:39:59
Julie Ball
Gardner Publications, Inc.
Cincinnati, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00492768
Message ID:
00493200
Views:
13
>I am attempting to create a query that contains 2 files and in file1 i have a field that has parts of company names and i want to get all of the records from file2 that have file1 in file2's company and division fields. How do i do a contains so that if i have 'LEAR' as one of my records in file1 then it will pull up 'LEAR Corp.' and 'cLEARwater Corp' in the company or division fields. Below is what i am attempting to do.
>
>SELECT topcompy.ptcomp, compy.co_compy, compy.co_div ;
>FROM Topcompy, compy;
>WHERE p_filename.compy CONTAINS sfcomp01.co_compy;
> OR p_filename.compy CONTAINS sfcomp01.co_div;
>INTO TABLE c:\results.dbf
select ... ;
from ... ;
where .. ;
compy.co_compy+compy.co_div in ;
(select co_compy+co_div ;
  from compy ;
  where co_compy like '%LEAR%' or co_div like '%LEAR%' )
Hoever I can't see p_filename in your query + your query is a candidate to produce reccount('topcompy')*recc('compny') records (join condition ?).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform