Cy
Mon Sep 24 21:16:42 PDT 2007
SET EXACT has exactly NO affect on SQL queries. That gives you two settings
that you have to make sure are set the right way, and frankly most of my (my
employers) customers actually like the ability to specify either way. Also
as I recall the exact settings are NOT optimizable. IIRC using == in a
query or filter precludes rushmore for that portion of the query/filter. I
would guess that set exact or set ansi on would have the same affect. There
is also the fact that VFP's query syntax is different than most other
products anyways since is doesn't use the same way of checking for values
within a string. Frankly you should train your users to use the proper
syntax, since that gives them more flexibility as they can either look for
"starts with" meaning single = and "exactly matching" meaning double =.
With set exact, that is not even a possibility.
--
Cy Welch
Senior Programmer/Analyst
MetSYS Inc.
http://www.metsysinc.com
"Tom Green" <bigband@preville.qc.ca> wrote in message
news:1190553103.738253.190360@n39g2000hsh.googlegroups.com...
> On Sep 22, 12:06 am, "Cy Welch" <cywe...@hotmail.com> wrote:
>> Naw, I never do that. I just use the IN clause of the replace command
>> which
>> removes the need to do that.
>>
>> --
>> Cy Welch
>> Senior Programmer/Analyst
>> MetSYS Inc.
http://www.metsysinc.com
>>
>> "Man-wai Chang ToDie" <toylet.toy...@gmail.com> wrote in
>> messagenews:eWRlzT4#HHA.3780@TK2MSFTNGP06.phx.gbl...
>>
>>
>>
>> > d...@willcraft.com wrote:
>> >> I am issuing the below syntax, and the result is it not only changes
>> >> what it is supposed to, but also records where groupid = 54
>>
>> > ALWAYS select the DBF/Alias first before a REPLACE. Always!
>>
>> >> REPLACE ALL groupname WITH "Customer Cell Numbers" FOR groupid = '5'
>>
>> > --
>> > @~@ Might, Courage, Vision, SINCERITY.
>> > / v \ Simplicity is Beauty! May the Force and Farce be with you!
>> > /( _ )\ (Xubuntu 7.04) Linux 2.6.22.6
>> > ^ ^ 20:50:01 up 9 days 11:09 1 user load average: 0.04 0.01 0.00
>> > news://news.3home.net news://news.hkpcug.org
>> > news://news.newsgroup.com.hk- Hide quoted text -
>>
>> - Show quoted text -
>
> The real problem is SET EXACT. In my opinion, you should always run
> with SET EXACT ON. It makes VFP comparisons like they are in virtually
> every other normal language. My users would be horrified if they did
> a select (I let them enter expressions in certain places) and found
> that "BIGGER"="BIG". The old SET EXACT OFF is a throwback to a
> bizarre feature of DBASE which is best forgotten.
>
> The problem with REPLACE... FOR LEFT(groupid,1)="5" --- as well as
> the some of the other suggestions --- is that they will not be
> optimized. Just SET EXACT ON. But beware, you need to review and
> maybe retest all your existing code. You may even find it FIXES old
> bugs you didn't know you had.
>