SQL Server Performance
  1. rahulwalawalkar New Member

    Hi All,

    I have a query which is as follows

    Select COL1,COL2,COL3
    (SELECT MAX(COST)
    FROM COSTTABLE
    WHERE COSTTABLE.NO = SALESTABLE.NO) SALESCOST
    FROM Materials INNER JOIN
    PROJECTS ON MATERIALS.NO = PROJECTS.NO

    My problem is I am getting 2 similar rows for Maxium cost,please can anyone let me know how can I select single row.I have COSTID WHICH IS IDENTITY COLUMN ,I am not sure how to select the max costid ......Please anyone .......can let me know

  2. FrankKalis Moderator

Share This Page