 		order by
 			CREATED_BY_AGENT_ID,
 			preferred_agent_name	;
-			
-			
+
+
 			---------->
-			
+
 <cfsavecontent variable="emailFooter">
 	<div style="font-size:smaller;color:gray;">
 		--

		</cfif>
	</cfloop>

	<cfquery name="funk2"  datasource="uam_god">
		select
			agent_id,
			preferred_agent_name,
			CREATED_BY_AGENT_ID,
			getPreferredAgentName(CREATED_BY_AGENT_ID) createdBy,
			'no_unabbreviated_variant' reason
		from
			agent
		where
			agent_id in (#baidlist#)
		order by
			CREATED_BY_AGENT_ID,
			preferred_agent_name
	</cfquery>

	<cfset baidlist="">
	<cfquery name="raw" datasource="uam_god">
		 select

		</cfif>
	</cfloop>

		<cfquery name="funk3"  datasource="uam_god">
			select
				agent_id,
				preferred_agent_name,
				CREATED_BY_AGENT_ID,
				getPreferredAgentName(CREATED_BY_AGENT_ID) createdBy,
				'no_unampersanded_variant' reason
			from
				agent
			where
				agent_id in (#baidlist#)
			order by
				CREATED_BY_AGENT_ID,
				preferred_agent_name
		</cfquery>
	<cfquery name="funk_norder" dbtype="query">
		select * from funk1 union select * from funk2 union select * from funk3
	</cfquery>
