Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    6

    Unhappy Unanswered: SQL query in MS OFFICE XP ACCESS

    I have a table named tblinventory.
    I have 4 columns: item_number, item_description, Unit_price, Quanity_onHand.

    I want to create SQL query to search for: Quanity on Hand that is Less than 100.

    My statement is something like this but doesn't work. I need you to help me correct it. The problem is in my WHERE entry but I do not know how to create the proper criteria operator.

    SELECT item_number, item_description
    FROM tblInventory
    WHERE Quanity_onHand < 100

    Your input is appcreciated!
    NTbluez®

  2. #2
    Join Date
    Oct 2003
    Posts
    6
    Here is what the table looks like. What I want is to create a SQL query, but dont know how, to show only those items where quanity on hand is Less than 100.

    Item_Number Item_Description Unit_Price Quanity_onHand
    1537 SHORTS $11.50 136
    1609 JACKET $24.85 40
    2719 T-SHIRT $9.75 24
    3512 TENNIS SHORTS $18.90 35
    3804 TENNIS SHIRT $17.45 118
    4205 SOCKS $3.25 160
    5172 SWEATSHIRT $18.75 225
    5173 SWEATPANTS $14.70 322
    5501 CAP $7.20 90
    6318 SWIMSUIT $21.50 52

    So Far my SQL query looks like this, but doesn't work.

    SELECT tblInventory.Item_Number, tblInventory.Quanity_onHand
    FROM tblInventory
    WHERE (((tblInventory.Quanity_onHand)<"100"));

    What does my SQL need to be?

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    SELECT tblinventory.Item_Number, tblinventory.Item_Description, tblinventory.Unit_Price, tblinventory.Quanity_onHand
    FROM tblinventory
    WHERE (((tblinventory.Quanity_onHand)<100));

    Because Quantiy_OnHand is a numeric value

Posting Permissions

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