getting the right record

Results 1 to 2 of 2

Thread: getting the right record

  1. #1
    Join Date
    Dec 1969

    Default getting the right record

    I have 3 calendar images, 3 mugs, and 2 bags in the recordset. They have different project_id but their var_id are similar(such as all calendars has a var_id=1; all mugs have var_id=2). Now from the recordset, I only need one image of each type to display such as 1 calendar, 1 mug, and 1 bag. Can you please help me?

  2. #2
    Jayaram Guest

    Default RE: getting the right record

    Please try this quer in sql 7<BR>select a.project from tablename as a where a.project in(select top 1 project from tablename as b where b.varid=a.varid)

Posting Permissions

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