Quick Question

  • Now I am summer intern at a computer company and they have me dealing with SQL Server sorting through somethings.Here is the thing I have a huge list of Product ID numbers maybe about 200-300 and I only need about 7 of those numbers.Some one told me that using WHERE and/or FROM I can get the numbers that want...I need to know is this possible and how can I do it...

  • If I understand you correctly, you are searching through a table/column that has lots of product Ids, but you really only need to retrieve data from 7 product IDs. If that's correct, you can use IN.

    SELECT <column names>

    FROM <table name>

    WHERE ProductID IN ('1', '2', '15')

    Just put in the columns you want to retrieve, the table name and replace my samples with the real Product IDs.

    -SQLBill

  • Thank you so much......Thats really helped now i can finish this project

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply