Hi, I'm trying to do query using this script:
Select * From <table> where <textfield> like ',@%'
the problem is that no record is being retrieved. Is there a way for me to search for special characters on textfields? Thank you very much
Printable View
Hi, I'm trying to do query using this script:
Select * From <table> where <textfield> like ',@%'
the problem is that no record is being retrieved. Is there a way for me to search for special characters on textfields? Thank you very much
have you tried this
Select * From <table> where <textfield> like '%,%@%'
It somehow works but unfortunately it doesn't display the data that I need. What I need is to query all records from that table based on the textfield with the starting text of the field is ",@'.
Your script does something else that I can't explain in words. Im sorry
Then your original query will work properly.Quote:
Originally Posted by charmedcharmer
Select * From TABLENAME Where FIELDNAME Like (',@%')
The query posted in my previous post will search all the records which contain , or @ in the field.Quote:
Originally Posted by charmedcharmer
You haven't stated what db you are using. Check it help files. There is usually an escape charact you can use before special characters. I think it is \ or / (can't remember which).
If you look up the help files on like operator it should mention something there. Or search escape characters online?