Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    16

    Unanswered: Parenthesis in field value

    Hello all

    I have a table called PRODUCT and the unique field in the table is called PARTNUMBER like so:

    PARTNUMBER DESCRIPTION
    12345(6) Widget 1
    12347(5) Widget 2

    my select SQL looks like this
    SELECT * FROM PRODUCT WHERE PARTNUMBER = '12345(6)'

    That statement fails. what can I do to get around this error?

    Regards
    The Captain

  2. #2
    Join Date
    Jun 2004
    Location
    Unfrozen in the year 3000
    Posts
    10
    The only obvious thing I can think of is that you should use the double quotes and not the single quotes.

    This works in SQL View in Access:

    SELECT PRODUCT.*, PRODUCT.PARTNUMBER
    FROM PRODUCT
    WHERE (((PRODUCT.PARTNUMBER)="12345(6)"));
    The Safety Dance!

    Dun-dun-dun-dun-dun-dun-dun-derder!!

    "There are two kinds of people: sheep and sharks. Whoever is a sheep is fired!"

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    How does the statement fail? Does it produce an error message?

    -PatP

Posting Permissions

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