I've only tested superficially, but how about this:
<cfquery.*?>.*?\b(emplid|emplno|empl_no|empno|emp_no|deptid|dept|department)\b.*?</cfquery>
This matches any usage of those columns in a <cfquery>,
not simply in the
where clauses. I'm not sure if this is sufficient. You could
modify to be
this, I suppose:
<cfquery.*?>.*?where.*?\b(emplid|emplno|empl_no|empno|emp_no|deptid|dept|department)\b.*?</cfquery>
(I tested that one even less thoroughly, sorry)
If you are using the cols in stored procedures, you'd neen a
variation on
the same theme.
Suggestion: organise your code so that DB interaction is
isolated into
separate files (like CFCs, if possible), so that when you
need to do this
sort of thing, you only need to look at a very small subset
of your
templates.
--
Adam