Query worked great .... thanks folks .. it was simple huh?

Paul Giesenhagen
QuillDesign



> > try...
>
> > SELECT c.id, c.description
> > FROM
> > choicetable c
> > WHERE
> > c.productid = '#URL.productid#'
> > AND c.id NOT IN (
> > SELECT
> > pc.choiceid
> > FROM
> > productchoicetable pc
> > WHERE
> > pc.productid = '#URL.productid#'
> > )
>
> or use not exists
>
> SELECT c.id, c.description FROM choicetable c
> WHERE NOT EXISTS (
> SELECT pc.productid FROM productChoiceTable
> WHERE pc.productid = #url.productid#
> )
>
> Might be faster -- not sure... You'd have to either compare the plans for
> the two queries in enterprise manager or just run them several times and
> compare the execution times...
>
> This assumes you're using SQL Server
>
>
> Isaac Dealey
> Certified Advanced ColdFusion Developer
>
> www.turnkey.to
> 954-776-0046
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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

Reply via email to