Is it possible to extract a substring in the WHERE clause in ColdFusion of either or in a Query of Queries? As an example, I am trying to use the following query to find all email addresses with the domain "comcast.net" (i.e. everything after the "@" in the email address). I am querying an MS-Access database table.
<cfquery name="test" datasource="membership">
SELECT email_address
FROM tblMembers
WHERE MID(email_address, INSTR(email_address, '@') + 1) = 'comcast.net'
</cfquery>
If I attempt this as a query, I get the error message "[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression."
If I attempt it as a Query of Queries, I get the error message 'Encountered "MID ( email1 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,'.
I would be very grateful for any help on finding something that works! Thanks for your help!
likei dont think, but it does support wildcards. Why not something likewhere email_address = %comcast.netor if it does supportlike,where email_address like '%comcast.net'- crthompsonlike. - Leigh