Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Funny BUG and Serious ISSUE
Message
From
02/04/2005 17:03:58
 
 
To
02/04/2005 15:55:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01001002
Message ID:
01001036
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform