• Simplest answer I can give you is that you are trying to use MS SQL Server based code in MySQL and MySQL doesn't like it.

    This is a Microsoft SQL Server site, what you find here works on MS SQL Server (with the correct version depending on the code).

    You may want to look for a MySQL forum where the may be able to provide you with better assistance.