Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Wildcard in query

Discussion in 'Information Technology' started by Steve Y, Jul 28, 2006.

Tags:
  1. Steve Y

    Steve Y
    Expand Collapse
    Guest

    I am trying to use a wildcard in a query criteria. I have tool numbers, for
    example:

    Tool #
    9537-57
    6-2223-42
    276150 0021
    276150 0033

    I would like to write a query that will select the two tool numbers with the
    276150 beginning. Please help.

    Thank you.
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. Joan Wild

    Joan Wild
    Expand Collapse
    Guest

    In the criteria row under Tool # column
    Like "276150*"

    --
    Joan Wild
    Microsoft Access MVP

    Steve Y wrote:
    > I am trying to use a wildcard in a query criteria. I have tool
    > numbers, for example:
    >
    > Tool #
    > 9537-57
    > 6-2223-42
    > 276150 0021
    > 276150 0033
    >
    > I would like to write a query that will select the two tool numbers
    > with the 276150 beginning. Please help.
    >
    > Thank you.
     
  4. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Try using Like in the query

    Select * From TableName Where [Tool #] Like [Please enter a part number] & "*"

    When running the query, the user will be prompt to enter a part number
    If you want to search for a part of the string any where in the part number,
    then use

    Select * From TableName Where [Tool #] Like "*" & [Please enter a part
    number] & "*"
    --
    Good Luck
    BS"D


    "Steve Y" wrote:

    > I am trying to use a wildcard in a query criteria. I have tool numbers, for
    > example:
    >
    > Tool #
    > 9537-57
    > 6-2223-42
    > 276150 0021
    > 276150 0033
    >
    > I would like to write a query that will select the two tool numbers with the
    > 276150 beginning. Please help.
    >
    > Thank you.
     
  5. ginnyk

    ginnyk
    Expand Collapse
    Guest

    Steve Y wrote:
    > I am trying to use a wildcard in a query criteria. I have tool numbers, for
    > example:
    >
    > Tool #
    > 9537-57
    > 6-2223-42
    > 276150 0021
    > 276150 0033
    >
    > I would like to write a query that will select the two tool numbers with the
    > 276150 beginning. Please help.
    >
    > Thank you.


    Use the 'Like' keyword, rather than an equal sign.
    Select Tool FROM Tools WHERE Tool# Like "276150*";
     

Share This Page