 			) and
 			regexp_like(preferred_agent_name,'[^A-Za-z -.]')
 		;
-		
+
 drop table temp2;
 
-create table temp2 as 
+create table temp2 as
 select
 			agent_id,
 			preferred_agent_name,

		</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>

		</cfif>
	</cfloop>

	<cfif len(baidlist) gt 0>
		<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>
	</cfif>
	<cfset baidlist="">
	<cfquery name="raw" datasource="uam_god">
		 select
