Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with SQL queries
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00893534
Message ID:
00893622
Views:
21
Carmel,

Why are you using ALLTRIM() in the first place?


>1.) When you say that ALLT could cause a lot of problems if used in WHERE clauses what kind of problems are you referring to ?
>Maybe you could give me an example with some data so that I can see what you mean.

First, using ALLTRIM() make your query not Rushmore optimizable. Second, it could cause partial matvhes because of the way VFP compares string. For example,
ALLTRIM("600 ") = ALLTRIM("6001") is .T.
* but
"600 " = "6001" is .F.
You can read more about that in help for SET EXACT and SET ANSI commands.

>
>2.) Is it safe to use ALLT in JOIN statement as follows:
>
>select iciwhs.citemno,iciwhs.cwarehouse;
> from iciwhs;
> inner join sotemp1 on allt(iciwhs.citemno)=allt(iciwhs.citemno) AND allt(iciwhs.cwarehouse)=allt(sotemp1.cwarehouse);
> into table c:\temp\method2

No, you'll run into the same problems.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform