>Hi Ed!
>
>Thanks for the suggestion. It appears that I will be able to get the results I'm after with this approach. Where should I look for more information on ANSI SQL?
>
The SELECT-SQL topic in the on-line help has a brief example of the LIKE clause as implemented in VFP; I'd read the docs, as scanty as they are, to get a feel for what syntax is supported. VFP's support of SQL has improved considerably over what was available under 2.x; OTOH, the LIKE clause has been with us since at least FPDOS.
Pinnacle put out a series of books at one time called
The Pros Talk FoxPro - at least two series of reports were published, and perhaps more. Somewhere around here I have a very shop-worn copy of the report on SQL in FoxPro; while it doesn't cover all additions to the language in VFP, it discusses SQL in FoxPro concepts really, really well. I'd check
www.pinpub.com to see what if any of these series of books are still available.
Hacker's Guide To Visual FoxPro 6.0 is a book that belongs on the shelf of anyone developing VFP applications; it covers key concepts of SQL in VFP in some detail, although it doesn't deal in depth with some of the clauses. If you buy the book, you can download the content of the book in a searchable, compiled .CHM file format; you can put that in place instead of the native VFP6.0 help, or drop a shortcut to it in the Quick Launch bar of your development system. In many ways, it's a better set of docs than the on-line docs that ship with VFP.
I'd also recommend grabbing Erik Moore's eView tool from here on UT; it creates and manages views much better than the native VFP View Designer.
>Thanks again
>
>Jim
>
>>Rather than using the internal $ operator, you might try converting to use the ANSI SQL LIKE clause for your compare, prefixing the comparison value with appropriate wildcards for ANSI SQL. If you want to emulate $, the equivalent code is shown below. Note that with a parameterized view, the use of the ? prefix to specify the argument is a view parameter is required:
>>
>>
SELECT * ;
>> FROM SharedWO ;
>> WHERE Descript LIKE ?cDescription
>>* avoid putting an alias in place if you don't need it
>>
>>* To use it, do the following:
>>
>>cDescription = '%'+cDescription + '%'
>>USE <i>my parameterized view name</i>
>>* This will use the current value of cDescription; if it is not defined, you
>>* will be prompted for it. NODATA will open the parameterized view
>>* but will not attempt to read any data, so the cDescription needn't be
>>* defined at the time that the USE statement is issued. If you use the DE
>>* you'll want to set the NODATAONLOAD property for the view.
>>* On a requery, you should ensure that either the original cDescription is in
>>* scope, or simply redfine it before the requery is issued
>>cDescription = '%'+cDescription + '%'
>>=REQUERY(<i>char expn alias of parameterized view being requeried</i>)