For the following query, all results that start with A will be returned: <cfquery name="type" datasource="mydatabase"> SELECT RECIPE_ID, RECIPE_NAME, LINK FROM TBLRECIPES WHERE RECIPE_NAME LIKE 'A%' ORDER BY RECIPE_NAME </cfquery> Code (markup): I would like to make it so it returns all recipes that begin with a number. Is the only way to do this as such:? <cfquery name="type" datasource="mydatabase"> SELECT RECIPE_ID, RECIPE_NAME, LINK FROM TBLRECIPES WHERE RECIPE_NAME LIKE '1%' OR '2%' ..etc... ORDER BY RECIPE_NAME </cfquery> Code (markup):
You'll have to look in your database's documentation. IIRC some db's support ranges such as LIKE '[0-9]%' or regular expression matching, but you'd have to check your documentation to know for certain.
It does support ranges. I tried it, and it worked. I saw the range function in the literature, but didn't know how it was applied... looking at your example, it makes sense. Thanks.