Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LEFT JOIN causes Not Enough Memory
Message
De
22/08/2001 23:40:41
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
LEFT JOIN causes Not Enough Memory
Divers
Thread ID:
00547778
Message ID:
00547778
Vues:
29
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...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform