RE: cfquery and mysql help

2008-04-21 Thread Andy Matthews
Do you have the query? -Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 10:53 AM To: CF-Talk Subject: cfquery and mysql help Hi, im sure there must be a better way of doing the following code, and much quicker. i have a query which is

Re: cfquery and mysql help

2008-04-21 Thread Richard White
hi andy query 1 has 2 columns firstName and lastName then i want to query the database to ensure that each firstName and lastName combination exists in the database, if not then i want it to return me a list of those that dont. i have achieved this through a loop but i am thinking there must

Re: cfquery and mysql help

2008-04-21 Thread Matt Gutting
You could try something like cfquery name=combined dbtype=query SELECT firstName, lastName FROM query1 WHERE NOT EXISTS ( SELECT firstName, lastName FROM query2 WHERE firstName = query1.firstName AND lastName = query1.lastName ) /cfquery No guarantees - this

Re: cfquery and mysql help

2008-04-21 Thread Richard White
thanks Matt, i will see if this works in query on query You could try something like cfquery name=combined dbtype=query SELECT firstName, lastName FROM query1 WHERE NOT EXISTS ( SELECT firstName, lastName FROM query2 WHERE firstName = query1.firstName