I have the following query that I am trying to use on a mySQL db (which
doesn't support sub-queries). Can anyone see a good way to write this query
other than with the sub query?
SELECT l.id, l.description,l.build_date,l.edit_date,l.admin_user,
(SELECT COUNT(*)
FROM mailroomLeadList ll
INNER JOIN customer c
ON ll.customerid = c.id
WHERE l.id = ll.id
AND c.mail_list <> 0
) AS userCount
FROM mailroomLead l
ORDER BY description DESC
I was trying to stick this information into a 'temp' table via mySQL, but it
is producing errors on the COUNT(*) ... Any suggestions?
Thank you
Paul Giesenhagen
QuillDesign
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm