Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Urgently needed! SQL Syntax in retrieving records...
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00616376
Message ID:
00616389
Views:
21
You should split the string into three parts and check for each of them. Something like
Where description Like "%" + LEFT(cDesc,4) + "%" OR/AND ;
  description Like "%" + RIGHT(cDesc,4) + "%" OR/AND ;
  description Like "%" + SUBSTR(cDesc,6,4) 
>Supposing I have a string variable cDesc = "VIBR CHOL BIOV" and will use this as reference to retrieve all records with descriptions containing any of the 3 words in any order. If description field contains "Cholera due to Vibrio cholerae 01, biovar cholerae" or "Cholera due to Vibrio cholerae 01, biovar eltor", these records should be included in the resultset.
>
>Where description = "%"+cDesc+"%" clause is not sufficient to do the above problem.
>
>Any inputs are highly appreciated!
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform