• it is working in sql 2005 also...

    Have you used the same query OR changed table names?