> >>select ID, > >>(select SERVER_ID from A where A.ID=B.GROUP_ID) as GROUP_ID > >>from B [...] > >>
> >It mentions, among others: > > Variable subqueries > > Subqueries must be static. They are evaluated only once. They > > may not, therefore, refer to variables in the main query. > I'm not the original poster.. but I'm trying to come up to speed on > SQL/sqlite and I'm having some trouble understanding this... What is an > example of a static subquery? The above is an example of a static sub-query. It's a query within a query. > And how would one re-write this to > eliminate the subquery? select B.ID, A.SERVER_ID from B inner join A on B.GROUP_ID = A.ID or select B.ED, A.SERVER_ID from A, B where A.ID = B.GROUP_ID I think.