Home Forums Data Warehousing Integration Services how to do sum the salarie of employes if empnames are equal in ssis RE: how to do sum the salarie of employes if empnames are equal in ssis

  • Here is a GROUP BY solution

    CREATE TABLE #T(EmpId INT, EmpName VARCHAR(50),Salary MONEY)

    INSERT INTO #T

    SELECT 123, 'andy', 10000 UNION ALL

    SELECT 111, 'Maddy', 12000 UNION ALL

    SELECT 121, 'Raman', 25000 UNION ALL

    SELECT 124, 'Hemanth', 40000 UNION ALL

    SELECT 133, 'krishna', 50000 UNION ALL

    SELECT 122, 'andy', 20000 UNION ALL

    SELECT 134, 'Raman', 60000 UNION ALL

    SELECT 143, 'Maddy', 30000

    SELECT SUM(Salary),EmpName FROM #T GROUP BY EmpName

    DROP TABLE #T

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]