• babak3334000 (9/2/2013)


    Mrci

    You are quite right in my Answer

    But I have a view and send it to the different conditions By Collection (Asp.net)

    I added the condition to Having, but will not display anything.

    SELECT FirstName, LastName, CompanyID, NCode, FatherName, nPercent, NationalCode

    FROM View_Report_Payesh_Tools

    WHERE (Tools = N'Walker') OR

    (Tools = N'Cane')

    GROUP BY FirstName, LastName, CompanyID, NCode, FatherName, nPercent, NationalCode

    HAVING (COUNT(Tools) = 2)

    What you posted above has additional columns. I would start by looking at your data. Any differences in the data you are grouping on could be part of the problem.