Unable to use 'sp unsubscribe' in Syntax of Marketing Cloud SQL Activities
Trailblazer Community

Unable to use 'sp unsubscribe' in Syntax of Marketing Cloud SQL Activities

Marketing Cloud Automations , Marketing Cloud Admin

Last updated 2020-01-27 ·Reference W-6077938 ·Reported By 5 users

Fixed in version Marketing Cloud Release January 2020

Summary
When using a Data Extension that contains 'sp unsubscribe' the following syntax error will be produced:

Query Validation error : "An error occurred while checking the query syntax. Errors: 'sp_unsubscribe' is a reserved word and may not appear in your query."

Repro
- Create a Data Extension with 'sp unsubscribe' in it (or any combination of 'sp' then a character and then 'unsubscribe' e.g. 'spAunsubscribe')
- Go to Automation Studio and create a SQL Query Activity
- Give it a name and click Next
- Put in the following SQL: Select * from [sp Unsubscribe]
- Click to validate the syntax and receive the error: "An error occurred while checking the query syntax. Errors: 'sp_unsubscribe' is a reserved word and may not appear in your query."

Workaround
- Change the SQL syntax to not include a combination of 'sp' then a character and then 'unsubscribe' (e.g. 'spunsubscribe')

Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.