Sergey,
cDesc is variable which means the string don't have specific length and have no specific no. of words typed. It can have "Chol Vibrio cholera biovar" in any order.
Something similar to Where cdesc $ description without truncating the words which are separated by spaces. And the SQL Syntax must be ANSI to make it SQL Server compatible. I know that there is a workaround but I need to confirm if there is a simplified alternative.
>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
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."