Can't use a subquery, this has to work with mysql.
Thanks
Paul Giesenhagen
QuillDesign
> Try this:
>
> SELECT o.id, o.name, o.description
> FROM #request.optionTable# o
> LEFT OUTER JOIN #request.productOptionTable# po
> ON po.optionid = o.id
> WHERE o.id NOT EXISTS (SELECT * FROM #request.productOptionTable#
> po WHERE po.optionid ='#url.productid#')
>
>
>
> > > How about
> > > WHERE (po.productid IS NULL) OR (po.productid NOT IN
> > > ('#url.productid#'))
> > >
> > > >
> > > > Odd the query didn't go through.. here it is again:
> > > >
> > > > SELECT o.id, o.name, o.description
> > > > FROM #request.optionTable# o
> > > > LEFT OUTER JOIN #request.productOptionTable# po
> > > > ON po.optionid = o.id
> > > > WHERE po.productid NOT IN ('#url.productid#')
> > > >
> > > >
> > > > > I am trying to run a query that joins two tables and
> > > > returns all the items
> > > > that are listed in the optionTable, BUT NOT the ones who
> have
> > > > the productid
> > > > of the url.productid in the productOption table.
> > > > > (o.id = po.optionid)
> > > > >
> > > > > Here is the query I have thus far and it returns no
> results .. if I
> > > > replace NOT IN with = '#url.productid#' it returns all the
> options
> > > > associated with that product.
> > > > >
> > > > >
> > > >
> > >
> >
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists