|
-
May 28th, 2007, 03:55 AM
#1
Thread Starter
Addicted Member
Select * From <table> Where <textfield> like ',@%'
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
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
-
May 28th, 2007, 04:57 AM
#2
Re: Select * From <table> Where <textfield> like ',@%'
have you tried this
Select * From <table> where <textfield> like '%,%@%'
Use [code] source code here[/code] tags when you post source code.
My Articles
-
May 28th, 2007, 05:36 AM
#3
Thread Starter
Addicted Member
Re: 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
C++ Programming is overwhelming.
Dont let it overwhelm you or you'll fall into the oblivion of its perfection
-
May 28th, 2007, 06:11 AM
#4
Re: Select * From <table> Where <textfield> like ',@%'
 Originally Posted by charmedcharmer
What I need is to query all records from that table based on the textfield with the starting text of the field is ",@'.
Then your original query will work properly.
Select * From TABLENAME Where FIELDNAME Like (',@%')
 Originally Posted by charmedcharmer
Your script does something else that I can't explain in words. Im sorry
The query posted in my previous post will search all the records which contain , or @ in the field.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
May 29th, 2007, 05:09 AM
#5
Re: Select * From <table> Where <textfield> like ',@%'
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?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|