OUTER JOIN

  • SELECT S.WFS_SERVER_ID, S.SERVERNAME, S.IPADDRESS, COUNT(*) AS Expr1

    FROM WFS_PROCESS P RIGHT OUTER JOIN

    WFS_SERVERS S ON P.WFS_SERVER_ID = S.WFS_SERVER_ID

    GROUP BY S.SERVERNAME, S.IPADDRESS, S.WFS_SERVER_ID

    ORDER BY S.WFS_SERVER_ID

    this returning folowinf records

    1Server12.5.15.364

    2Server22.5.15.3199

    3dd2.5.15.131

    But for last record it should be 0 as there are no records for dd??




    My Blog: http://dineshasanka.spaces.live.com/

  • Oh! Got it 🙂

    COUNT(*) is the problem

    COUNT(P.WFS_SERVER_ID )




    My Blog: http://dineshasanka.spaces.live.com/

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply