paradis222
Programmer
I have a question related to grouping data
I have 2 fields, id and Serial No. id is unique and Serial No can be duplicate
the query like this:
<cfquery name="recordcheck" datasource="support">
select Max(id) as tempid, Serialno from loan where Serialno IN (#QuotedValueList(tracking.Serialno)#) group by Serialno
</cfquery>
I would like to select all record in table "loan", if there is duplicate serial no in the table, then select serial no with a large value of "id" , how can i do that? thanks!
I have 2 fields, id and Serial No. id is unique and Serial No can be duplicate
the query like this:
<cfquery name="recordcheck" datasource="support">
select Max(id) as tempid, Serialno from loan where Serialno IN (#QuotedValueList(tracking.Serialno)#) group by Serialno
</cfquery>
I would like to select all record in table "loan", if there is duplicate serial no in the table, then select serial no with a large value of "id" , how can i do that? thanks!