PC Review


Reply
Thread Tools Rate Thread

Delete anything with # symbol in field

 
 
=?Utf-8?B?U3VwZQ==?=
Guest
Posts: n/a
 
      7th Nov 2007
I have a table where I want to delete and items that has ## in the Brand
name. Example would be ##VISTA. If is set up a Delete query with Like
"*##*" in the criteria field, it deletes anything with a number in
the Brand name, not anything with ## in the name. Assume Access see the # as
any number. Is there way for it to look at # as a text and not as any
number?
 
Reply With Quote
 
 
 
 
James A. Fortune
Guest
Posts: n/a
 
      7th Nov 2007
Supe wrote:
> I have a table where I want to delete and items that has ## in the Brand
> name. Example would be ##VISTA. If is set up a Delete query with Like
> "*##*" in the criteria field, it deletes anything with a number in
> the Brand name, not anything with ## in the name. Assume Access see the # as
> any number. Is there way for it to look at # as a text and not as any
> number?


LIKE "*[#][#]*"

James A. Fortune
(E-Mail Removed)
 
Reply With Quote
 
James A. Fortune
Guest
Posts: n/a
 
      7th Nov 2007
James A. Fortune wrote:

> LIKE "*[#][#]*"


This also worked:

LIKE "*[##]*"

James A. Fortune
(E-Mail Removed)
 
Reply With Quote
 
=?Utf-8?B?U3VwZQ==?=
Guest
Posts: n/a
 
      7th Nov 2007
Great. Thanks!

"James A. Fortune" wrote:

> Supe wrote:
> > I have a table where I want to delete and items that has ## in the Brand
> > name. Example would be ##VISTA. If is set up a Delete query with Like
> > "*##*" in the criteria field, it deletes anything with a number in
> > the Brand name, not anything with ## in the name. Assume Access see the # as
> > any number. Is there way for it to look at # as a text and not as any
> > number?

>
> LIKE "*[#][#]*"
>
> James A. Fortune
> (E-Mail Removed)
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      7th Nov 2007
On Wed, 7 Nov 2007 13:18:00 -0800, Supe <(E-Mail Removed)>
wrote:

>I have a table where I want to delete and items that has ## in the Brand
>name. Example would be ##VISTA. If is set up a Delete query with Like
>"*##*" in the criteria field, it deletes anything with a number in
>the Brand name, not anything with ## in the name. Assume Access see the # as
>any number. Is there way for it to look at # as a text and not as any
>number?


Yes; you can override the interpretation of a wildcard character by enclosing
it in square brackets. A criterion of

LIKE "[#][#]*"

will return only records with two literal octothorpes at the beginning of the
field.

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to delete paragraph symbol Los Gatos Gal Microsoft Outlook Contacts 0 9th Feb 2010 01:58 AM
@ symbol in field dudemanmax Microsoft Excel Misc 6 20th Dec 2009 04:56 PM
delete the actual symbol * simple user with problem Microsoft Excel Misc 2 3rd Jul 2008 09:02 PM
how do I delete all text before or after a symbol? =?Utf-8?B?VG9ueQ==?= Microsoft Excel Programming 5 27th Jan 2007 08:48 PM
Delete all file using * symbol Pujo Aji Microsoft C# .NET 2 18th Jan 2005 08:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:56 PM.