Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Urgently needed! SQL Syntax in retrieving records...
Message
De
07/02/2002 03:45:16
 
 
À
07/02/2002 02:57:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00616376
Message ID:
00616455
Vues:
25
>Jess,
>I cannot think of an easy solution. The only thing that comes to mind is to convert cDesc into an array and then build the WHERE clause using the syntax Sergey has suggested for each word. In any case, the query won't be optimized with these kind of operators.
>Since you mentioned SQL Server, you may consider Full-Text Search, although I have no personal experience with this feature. If you were looking for a pure VFP solution, then phdBase would be an alternative.

Actually, there's a completely trivial solution; simply parse the string cDesc and generate a unique WHERE clause at runtime. Using a regular expression parser such as VBScript.RegExp, you could create a regular expression which, when applied, would return a collection of tokens which could then be used to construct LIKE expressions immediately prior to invoking the SELECT statement; it might be worthwhile implementing it as an SP on each platform and taking advantage of platform-specific behaviors implementing the SELECT on each discrete platform.

Honestly, it's a broadly boring problem; the table could easily be restructured to parse the description field into a supernormal set of attributes describing the record, and the query is then posed against the attribute set for each record. At that point, the query becomes optimizable...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform