Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG or am I missing something very obvious?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
BUG or am I missing something very obvious?
Divers
Thread ID:
01184707
Message ID:
01184707
Vues:
63
CREATE CURSOR crsTest (cCode char(4))

INSERT INTO crsTest VALUES('0001')
INSERT INTO crsTest VALUES('0001')
INSERT INTO crsTest VALUES('0001')
INSERT INTO crsTest VALUES('0001')
INSERT INTO crsTest VALUES('0002')
INSERT INTO crsTest VALUES('0002')
INSERT INTO crsTest VALUES('0002')
INSERT INTO crsTest VALUES('0002')

CREATE CURSOR crsTest1 (cCode char(4))
INSERT INTO crsTest1 VALUES('0001')

DELETE crsTest;
 FROM crsTest;
LEFT JOIN crsTest1;
     ON crsTest.cCode = crsTest1.cCode;
     WHERE crsTest1.cCode IS NULL
SELECT crsTest
BROWSE NORMAL

**** TA - DA whole crsTest cursor apears here
**** no marked records at all.
From help:
FROM [FORCE] Table_List[[, Table_List...] | [JOIN [Table_List]]] 
Specifies one or more tables containing the data for the delete operation. 

The FROM clause has the same syntax as in the SQL SELECT command except for the following restrictions: 
    The target table or cursor cannot be included in an OUTER join as a secondary table or cursor. 
    It should be possible to evaluate all other JOIN operations before performing a JOIN operation on the target table. 
    The target cursor cannot be the result from a subquery. 
    For more information, see SELECT - SQL Command. 
But crsTest is not a second table in the JOIN. the select:
SELECT *;
 FROM crsTest;
LEFT JOIN crsTest1;
     ON crsTest.cCode = crsTest1.cCode;
     WHERE crsTest1.cCode IS NULL
works as expected.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform