Forums

SELECT DISTINCT records

mkusens 27 Oct, 2012
I have been searching through the forums for answers to this and found some suggestions but none see to work. I have a table with multiple records that are unique but one of the fields "fileno" can repeat the same value in several records. In the CC list that populates, I want to have it only show a single line for any given "fileno" value and the most recent one at that. In SQL I would use a SELECT DISTINCT statement before the where clause.

The suggestions I have seen are to use GROUP BY in the ORDER BY field which doesn't seem to work. Is there are way to accomplish this in CC?
GreyHead 28 Oct, 2012
Hi mkusens ,

I'm not expert in the CC version but I can't see any way of adding DISTINCT :-( It would need to go before the column list as SELECT DISTINCT `some_column`, . . .

This version has a separate ORDER BY option so you probably can't sneak a GROUP BY into the correct sequence either.

Bob
Max_admin 03 Nov, 2012
Hi,

Did you try to use the GROUP BY in the Where SQL box ?

1=1 GROUP BY `column_name`


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.