• The query is exactly the same as the one thats runs in SQL Server Management Studio (all upper case).

    Cheers

    Danny