By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,657 Members | 1,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,657 IT Pros & Developers. It's quick & easy.

Like problem in SQL

P: n/a
Ig
Hi,
I have table A and record in it where field f1 has value "KUKU #1".
SELECT * FROM A1 WHERE f1 like 'KUKU #*' DOESN'T return this record.
SELECT * FROM A1 WHERE f1 like 'KUKU *#*' DOES return this record.
What is the problem?
Does symbol # have some specific meaning?
Thanks

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Tue, 1 Nov 2005 21:26:10 -0600, Ig wrote:
Hi,
I have table A and record in it where field f1 has value "KUKU #1".
SELECT * FROM A1 WHERE f1 like 'KUKU #*' DOESN'T return this record.
SELECT * FROM A1 WHERE f1 like 'KUKU *#*' DOES return this record.
What is the problem?
Does symbol # have some specific meaning?
Thanks


Yes it does.
Surround the # with brackets.
Like "KUKU [#]*"
will return KUKU #1.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Nov 13 '05 #2

P: n/a
Ig
Thanks.
Are there any other symbols that need surrounding brackets?

"fredg" <fg******@example.invalid> wrote in message
news:dn***************************@40tude.net...
On Tue, 1 Nov 2005 21:26:10 -0600, Ig wrote:
Hi,
I have table A and record in it where field f1 has value "KUKU #1".
SELECT * FROM A1 WHERE f1 like 'KUKU #*' DOESN'T return this record.
SELECT * FROM A1 WHERE f1 like 'KUKU *#*' DOES return this record.
What is the problem?
Does symbol # have some specific meaning?
Thanks


Yes it does.
Surround the # with brackets.
Like "KUKU [#]*"
will return KUKU #1.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Nov 13 '05 #3

P: n/a
On Tue, 1 Nov 2005 22:16:14 -0600, Ig wrote:
Thanks.
Are there any other symbols that need surrounding brackets?

"fredg" <fg******@example.invalid> wrote in message
news:dn***************************@40tude.net...
On Tue, 1 Nov 2005 21:26:10 -0600, Ig wrote:
Hi,
I have table A and record in it where field f1 has value "KUKU #1".
SELECT * FROM A1 WHERE f1 like 'KUKU #*' DOESN'T return this record.
SELECT * FROM A1 WHERE f1 like 'KUKU *#*' DOES return this record.
What is the problem?
Does symbol # have some specific meaning?
Thanks


Yes it does.
Surround the # with brackets.
Like "KUKU [#]*"
will return KUKU #1.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


The ones that come to mind are
* [ ]
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.