• Thank you very much for the help.

    I couldn't change the database compatibility level due to a lot of old stuff so I created the view in a new database and then just called this from a view in this database.

    It's all working great 🙂