Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LEFT JOIN causes Not Enough Memory
Message
From
22/08/2001 23:40:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
LEFT JOIN causes Not Enough Memory
Miscellaneous
Thread ID:
00547778
Message ID:
00547778
Views:
36
Hi,
I have the following SQL statement which cause NOT ENOUGH MEMORY
SELECT Card_No AS cCardNo , s.SalesNo, s.sDate, s.pLocation AS Location, ;
     IIF(ISNULL(sTotal - RAmount), 0, sTotal - RAmount) AS Total, ;
     IIF(ISNULL(FLOOR(sTotal - RAmount)), 0, FLOOR(sTotal - RAmount)) AS SalesPoint  ;
FROM Member n  LEFT JOIN Sales s  ;
     ON Card_No == s.IDNumber  AND ( s.pLocation = 'ZONE 3    '  OR ;
     s.pLocation = 'ZONE 2    '  OR  s.pLocation = 'DAMBR     '  OR ;
     s.pLocation = 'ZONE 1    ' )  ;
INTO CURSOR csrCustom 
Therefore, I change it to :
SELECT Card_No AS cCardNo , s.SalesNo, s.sDate, s.pLocation AS Location, ;
     IIF(ISNULL(sTotal - RAmount), 0, sTotal - RAmount) AS Total, ;
     IIF(ISNULL(FLOOR(sTotal - RAmount)), 0, FLOOR(sTotal - RAmount)) AS SalesPoint  ;
FROM Member n  LEFT JOIN Sales s  ;
     ON Card_No == s.IDNumber  <B> WHERE </B> ( s.pLocation = 'ZONE 3    '  OR ;
     s.pLocation = 'ZONE 2    '  OR  s.pLocation = 'DAMBR     '  OR ;
     s.pLocation = 'ZONE 1    ' )  ;
INTO CURSOR csrCustom 
However, it return wrong result. The PLocation condition is not evaluated correctly. Any ideas?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Next
Reply
Map
View

Click here to load this message in the networking platform