Here is my sql statement: <BR>Select email FROM EmailList WHERE email Like '*#*' <BR><BR>I want all records that have a # in them.
Select email FROM EmailList WHERE email Like '*[#]*'
Select email FROM EmailList WHERE email Like '%#%'<BR>
In Access you use *, but in SQL queries made via ADO you must use %<BR><BR>Similarly for _ vs. ? though I always forget which is which in that case.<BR><BR>
At least it's wrong assuming the ASP code is using ADO.<BR><BR>
Any idea?<BR><BR>Anyway, from ADO you would then use <BR> LIKE '%[#]%'<BR><BR>
denotes number !
"Select fieldname from Tablename where instr(fieldname, '#') [hl="yellow"] > 0[/hl]"<BR><BR>You just need to make sure you are getting a *boolean* value from the condition. Without the > 0 part you aren't.<BR><BR>
I guess it is for dates in assess. I know I write something like this:<BR>Select theDate from SOMETABLE WHERE theDate = #Date#