Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL & setting of exact.
Message
From
12/06/2003 13:33:58
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00799387
Message ID:
00799464
Views:
26
>Seems like I am getting hits for data I do not want when using sql select statement. "Select pn,noun,cal_int from d:\zcalauth;
> where ALLTRIM(pn)=ALLTRIM(mpart_nbr) into cursor zcal"
>if mpart_nbr='44', I am getting matches on "44-10", "444", "445-9"
>only with SQL though :-(

Tim,
As suggested == is the right answer. Wanted to note that using == in SQL you don't need any rtrim() functions. ie: Assuming no spaces on left these are equivalant :

where myField == lcMySearch
where alltrim(myField) == alltrim(lcMySearch)

For SQLs use 'set ansi' if needed not 'set exact'.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform