Self-referencing table join queries

Posts   
 
    
Posts: 98
Joined: 09-Feb-2005
# Posted on: 11-Feb-2005 23:48:47   

We have a table: Forum ForumID ParentID Url Title

We want to write the following query using LLBLGen

select y.Url, y.title, x.Url, x.Title From Forum as x inner join forum as y on x.forumid = y.parentforumid where x.url = 'SOME URL'

We don't know how do we indicate which Url & Title we're looking for. Suggestions?

Thanks! -Jeff

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 12-Feb-2005 21:08:37   

jeffdeville wrote:

We have a table: Forum ForumID ParentID Url Title

We want to write the following query using LLBLGen

select y.Url, y.title, x.Url, x.Title From Forum as x inner join forum as y on x.forumid = y.parentforumid where x.url = 'SOME URL'

We don't know how do we indicate which Url & Title we're looking for. Suggestions?

Please see the section "Creating dynamic lists" in the using the typed list and typed view classes" in the documentation. Using the same entity more than once in a typed list is coming soon.

Frans Bouma | Lead developer LLBLGen Pro