Results 1 to 4 of 4

Thread: Select specific purchase price

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Answers
    1

    Select specific purchase price

    How to write a query to if you need to see only the products for a particular price. For example, I need to only see products that have 980 as the last three digits of the purchase price. The products column is call vehicles, the price column is called list_price, the table is table_inventory.

    Please Help!


  2. #2
    Junior Member
    Join Date
    Sep 2007
    Answers
    10

    Re: Select specific purchase price

    u can try this one

    select productname from tablename
    where purchaseprice like '%980'


  3. #3
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Select specific purchase price

    Try this

    SELECT vehicles,list_price
    From table_inventory
    WHERE list_price like '%980'


  4. #4
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Select specific purchase price

    You may get the result in this way also

    SELECT vehicles,list_price
    FROM table_inventory
    WHERE substr(list_price,-3,length(list_price)) = '980'


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact