Subject How do I write query Part 2
Author Grant Brown
Hi guys and gals,

I did what you said but I ended up with 3 records when I should have
only received 1

ENQUIRES has 3 records in it, but only 1 record matches the date span.

What did I do wrong ?

Select BD.DetectId, BD.BUS_NAME, BD.OURREF
From BUSDETAILS BD
join BUS_VEN BV on (BV.HEADID = BD.DETECTID)
join ENQUIRES EQ on (EQ.HEADID = BV.DETECTID)
Where EQ.DATE_ENQUIRED between :D1 and :D2
Order By 2


--
Regards,
Grant Brown

Product Development Manager
Phone : 02 4229 1185
Mobile : 0412 926 995
Email : grant@...
Web : www.sitedoc.com.au

SiteDoc - Easy to Use - Powerful Results