|
Hi
I was having a problem with nested queries.. where
the first one was
Select
distinct e.name,
e.employmentid
from employment e join personemployment pe on pe.employmentid = e.employmentid where pe.personid = :PersonID ParamByName('PersonID').AsString := Request.QueryFields.Values['person']; then i did this:
while not eof do
//display e.name
query2:
select
s.name
from skill s join skillneeded sn on sn.skillid = s.skillid where sn.employmentid = :employmentid query2.open;
while not query2.eof do show s.name
this was showing some weird results.. ie the second
query was returning only one record, and it was repeated under every employment
name (even tho it had no relation to the query1 record)
I banged my head for ages, then on a whim removed
the distinct from my first query, now all is well.
Why????????????????????
|
