Advanced Report Usage Notes: Filter Strings by Using "Begins With"

If possible, filter strings by matching “begins with” rather than “contains” or “ends with”. If that's not possible, consider creating a custom field. For example, the following will not be able to use the index on ts.contact:

SELECT DISTINCT ts.*
FROM
	$TBL_TRANSFER_SESSIONS ts
WHERE
	ts.contact LIKE '%Euro2012_Livex%'
;

If you know all the possible ways the string could begin, you could enumerate them like this:

SELECT DISTINCT ts.*
FROM
	$TBL_TRANSFER_SESSIONS ts
WHERE
	ts.contact LIKE 'AA_Euro2012_Livex%'
	OR ts.contact LIKE 'BB_Euro2012_Livex%'
	OR ts.contact LIKE 'CC_Euro2012_Livex%'
;

If the report is only to be run for a small date range and there are few transfer sessions then you may not need to worry about this. If you expect to be running over large date ranges and large numbers of sessions, then you should create a custom field that detects the presence of the match string and then copies it to the custom field -- you could then filter on the custom field instead.