i am trying to loop through a query, to get the highest createdTime.
The column instanceId is a GUID (string) what gives me this error:

The reference 396B3850 is the beginning of an instanceId
<cfquery datasource="hostmanager" name="licenses">
SELECT *
FROM licenses
</cfquery>
<cfloop query="licenses">
    <cfquery name="getHighestCreatedTime" dbtype="query">
    SELECT MAX(CREATEDTIME)
    FROM licenses
    WHERE instanceId = #licenses.instanceId#
    AND startDate = #licenses.startDate#
    </cfquery>
</cfloop>
 
     
     
    