Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Funny BUG and Serious ISSUE
Message
De
02/04/2005 17:03:58
 
 
À
02/04/2005 15:55:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01001002
Message ID:
01001036
Vues:
17
>Hi Fabio,
>
>You are correct. There is a bug here. The following query is illegal in VFP and should fail:
>
>
>SELECT ;
> id;
>, !ISNULL((SELECT .T. FROM PivotConstant WHERE EXISTS(SELECT*FROM tree WHERE parentId=T.id))) hasChild;
>FROM tree T
>
>
>It is illegal in VFP because correlation is supported only to immediate parent query.
>
>Thanks,
>Aleksey.

And this ?
CLEAR
CLOSE DATABASES ALL
CLOSE TABLES ALL

CREATE CURSOR tree (id I,parentId I NULL)
INSERT INTO tree VALUES (1,NULL)
INSERT INTO tree VALUES (2,NULL)
INSERT INTO tree VALUES (3,1)
INSERT INTO tree VALUES (4,1)
INSERT INTO tree VALUES (5,2)


SELECT ;
	id;
,	(SELECT 1 FROM tree WHERE parentId=T.id HAVING COUNT(*)<0) hasChild;
INTO CURSOR _R1;
	FROM tree T
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform