+ Reply to Thread
Results 1 to 6 of 6

Filtering out fields with asterisks in MS Query

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Filtering out fields with asterisks in MS Query

    Does anyone know how to filter out fields contains multiple "*" using Microsoft Query?

    I am running a query on my database and trying to filter out a field which contains varying amount of asterisks.

    I cannot get it to work.

    Tried Contains '*'

    Tried Like '[!*]%'

    Tried begins with '*'

    is an asterisk a wildcard in sql? and if so, is there a character like the tilde I can use to ignore the wildcard and search the actual character?

    btw, i did try using the tilde to no further avail.
    Last edited by NBVC; 10-14-2009 at 11:14 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Filtering out fields with asterisks in MS Query

    I can't test myself but wonder if contains[*] may work ?

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Filtering out fields with asterisks in MS Query

    Hi DonkeyOte,

    It converts that to:

    Not Like '%[*]%'

    and it doesn't work..

    I am trying to filter those out... so "does not contain the asterisks" is what I need.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Filtering out fields with asterisks in MS Query

    I think i got it...

    I tried does not end with '*'

    ie. Not Like '%*'

    and it worked....

    I guess it doesn't allow the asterisk to be first char... but okay if it is mid or last

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Filtering out fields with asterisks in MS Query

    I did a test against an XL file with does not contain[*] and it returned the expected results...

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Filtering out fields with asterisks in MS Query

    Not sure why it didn't work with my data then.. it should have, if does not end with worked... strange...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1