Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying last level un self-referenced table
Message
From
21/09/2001 11:49:15
 
 
To
21/09/2001 11:34:12
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00559275
Message ID:
00559301
Views:
17
This message has been marked as the solution to the initial question of the thread.
>Hi Crescencio
>
>A simplified structure in order to sample what I need looks like this :
>
>(iid i, ;
>iidParent i,
>cAccount c(40))
>
>Where iidParent contains a reference to iID (the parent), this defines the parent-child relationship.
>
>Right now I'm trying a sets difference by using the NOT IN clause of the sql-statement.
>
>
>Oscar
>
-snip-
Oscar,

Would a query that searches for those iid's who aren't nobody's iidparents work? For example:
Select * from selfrefer ;
   Where iid not in (Select Distinct iidparent From selfrefer)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform