Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
== and = driving me crazy
Message
 
To
14/06/1999 15:22:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00229646
Message ID:
00229651
Views:
13
The difference is that = will stop matching when it runs out of characters on the right-hand side. So ?"ABC"="AB" will return .T. With == only an exact match will return .T.

>I can't find anything in the help about the difference between = and ==. I'm guessing the == is "more exacting". But I can't see why I only get 15 records returned from the first statement below and I get 100 returned from the 2nd. I've alltrimmed about everything so that should take care of any wierd extra spaces or anything. I visually checked the results when I got the 100 records and they're all district = "PE" and cost center = "934".
>
>I just don't get it? Help?????
>
>My first statement (that produces 15 records) is :
>
SELECT 	DISTINCT ITEMS.ITEM_ID ;
>FROM 	ITEMS, DISTRC ;
>WHERE	alltrim(DISTRC.DISTRICT) == alltrim("PE") AND ;
>	alltrim(DISTRC.RC) == alltrim(ITEMS.RC) AND ;
>	alltrim(items.rc_cc) == ALLTRIM("934")
>
>
>The second one (that produces 100 records) is:
>
SELECT 	DISTINCT ITEMS.ITEM_ID ;
>FROM 	ITEMS, DISTRC ;
>WHERE	alltrim(DISTRC.DISTRICT) = alltrim("PE") AND ;
>	alltrim(DISTRC.RC) = alltrim(ITEMS.RC) AND ;
>	alltrim(items.rc_cc) = ALLTRIM("934")
>
>
>Being as I've alltrimmed everything, I don't understand the difference? Thanks in advance for any help.
Previous
Reply
Map
View

Click here to load this message in the networking platform