QueryOfQuery with ColdFusion MSAccess - Select title first letter only

  • Thread starter Thread starter walter via AccessMonster.com
  • Start date Start date
W

walter via AccessMonster.com

The column "title" exists in a normal query.
Need to select the first letter of the titles to build a list for a prev-next
alphabetical search.

I am not able to make this QoQ work.
I have tried many variations both in the SELECT statement and in the GROUP BY

<cfquery name="getFirstLetters" dbtype="query">
SELECT left(getEntries.Title,1) as FirstLetter
FROM getEntries
GROUP BY left(getEntries.Title,1)
</cfquery>


Any help cordially appreciated. Thank You
ContiW
 
I'm not sure which functions work in a query of queries. Consider creating
the FirstLetter in your original query. Then your second <cfquery> will be:

<cfquery name="getFirstLetters" dbtype="query">
SELECT FirstLetter
FROM getEntries
GROUP BY FirstLetter
</cfquery>
 
Consider creating the FirstLetter in your original query.

Thank You Douane. It works. Still I will continue researching why it doesn't
in the QoQ.
Have a nice weekend.
WalterConti
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top