Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    9

    Unanswered: Access SQL Query

    Hi,

    Is it possible to obtain certain records from a query without creating a
    query for each item?

    i.e.

    SELECT quoteprod_id, prod_id, descrip, cost AS info1,
    (SELECT quoteprod_id, prod_id, descrip, cost FROM products WHERE
    quoteprod_id = 'MMColParam2' ) AS info2
    (SELECT quoteprod_id, prod_id, descrip, cost FROM products WHERE
    quoteprod_id = 'MMColParam3' ) AS info3
    FROM products
    WHERE quoteprod_id = 'MMColParam'

    Where MMColParam, MMColParam2 and MMColParam3 are Request query values.

    Thanks!

  2. #2
    Join Date
    Jan 2005
    Posts
    24
    cant you alter your criteria with Logical Operator And/Or depending on what your expecting

    SELECT quoteprod_id, prod_id, descrip, cost FROM products
    WHERE quoteprod_id = 'MMColParam' Or quoteprod_id = 'MMColParam2' Or quoteprod_id = 'MMColParam3'

Posting Permissions

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