Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtered the 2nd table based on the result of 1st table
Message
From
08/08/2003 09:50:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
08/08/2003 09:36:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00818131
Message ID:
00818191
Views:
24
>the relation...
>
>Say a user look for a book based on the title of book, he will input a word as a keyword and system will look for it in cTitle field of Tbooks table, and display it in GridBook. I just use SET FILTER and it works just fine.
>
>But,when system can't find it, the keyword will be transformed as a code,using metaphone algorithm, and system will look for the same code in cCode field of Tcode table. Then all of the words, that has the same code, will be displayed in GridWord. (There are 2 fields in Tcode table, cWord and cCode). I just use SET FILTER and it works just fine too.
>
>The problem is I want to filter Tbook table based on the words that is displayed on the GridWord.
>
>How is it?

I think I still couldn't understand it right. Will try with the part I could understand :
thisform.grdBook.Recordsource = ''
select * from TBook ;
  where upper(cTitle) like '%'+upper(lcKeyWord)+'%' ;
  into cursor crsBooks
if _Tally = 0
 select * from TBook ;
   inner join Tcode ;
   on upper(Tbook.Title) like '%'+upper(trim(Tcode.Code))+'%' ;
   into cursor crsBooks
endif
thisform.grdBook.Recordsource = 'crsBooks'
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
Next
Reply
Map
View

Click here to load this message in the networking platform