Hi
I have constructed the following SQL statement using the graphical query tool in Access (the query works fine).
sql_fields ="SELECT categories.category_name AS categories_category_name, Count(items.category_name) AS items_category_name
FROM items INNER JOIN categories ON items.category_name = categories.category_name
GROUP BY categories.category_name
HAVING (((Count(items.category_name))<>0))
ORDER BY Count(items.category_name)"
I have enclosed it in "s and removed the semicolon from the end, but all I get is an 'unterminated string constant' error message after 'Count(items.category_name)'
Am I doing something obvious wrong?
Gerard
I have constructed the following SQL statement using the graphical query tool in Access (the query works fine).
sql_fields ="SELECT categories.category_name AS categories_category_name, Count(items.category_name) AS items_category_name
FROM items INNER JOIN categories ON items.category_name = categories.category_name
GROUP BY categories.category_name
HAVING (((Count(items.category_name))<>0))
ORDER BY Count(items.category_name)"
I have enclosed it in "s and removed the semicolon from the end, but all I get is an 'unterminated string constant' error message after 'Count(items.category_name)'
Am I doing something obvious wrong?
Gerard