473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Like problem in SQL

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
3 1497
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: tomek | last post by:
What should I write after sql like for finding hole words and not for words in string sequence. I tryied "like space variable space" but it's not working for me. Database is MYSQL.
1
by: Mooky Mooksgill | last post by:
I would like to search a table for a phrase, or for a partial phrase, eg on table product - for name or description, or name + descprition. How does one say select * from product where name +...
7
by: Michael Beumers | last post by:
Hello NG I've defined a cursor like the following in my COBOL Programm: DECLARE testc CURSOR FOR SELECT ... FROM ... WHERE field1 LIKE :hostvariable1 field2 LIKE :hostvariable2
4
by: Tom Walker | last post by:
I cannot get the WHERE statement to work correctly unless I use a literal with the LIKE. I want to use a working storage data name so that I can vary the WHERE statement. Example that works: ...
5
by: Steve | last post by:
Hello, I currently have a query that takes it's criteria from a form. All works well except when a name is mis-spelled in the database. My thought was to try to use the "like" command as part of...
11
by: ynott | last post by:
Novice here obviously. Anyway, I'm a bit confused about how to approach this. I have a query against a table that I'm trying to create. I'm trying to view all streets.type values that are null,...
9
by: Nathan Sokalski | last post by:
I am trying to do a database search using LIKE using the following code: Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click If...
2
by: Ed Brown | last post by:
I'm working on a VB.Net application that needs to do quite a bit of string pattern matching, and am having problems using the "LIKE" operator to match the same string twice in the pattern. For...
4
by: Együd Csaba | last post by:
Hi All, I'd like to "compress" the following two filter expressions into one - assuming that it makes sense regarding query execution performance. .... where (adate LIKE "2004.01.10 __:30" or...
11
by: Dan Sugalski | last post by:
Is there any good way to speed up SQL that uses like and has placeholders? Here's the scoop. I've got a system that uses a lot of pre-generated SQL with placeholders in it. At runtime these SQL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.