Double Hyphen Comments in Query Activities cause them to fail during execution
Trailblazer Community

Double Hyphen Comments in Query Activities cause them to fail during execution

Marketing Cloud Automations

Last updated 2019-10-21 ·Reference W-4852510 ·Reported By 0 users

In Review

Summary
Utilizing double hyphen comments in SQL Activities cause them to fail at run time.

Repro
Create a query activity with the following text:

SELECT EmailAddress FROM _Subscriber WITH (NOLOCK)
--Get subscribers in the account
WHERE SubscriberKey = '12345'

This will save and pass validation, however, will fail at run time. This is documented as unsupported here:
https://help.salesforce.com/articleView?id=mc_as_sql_reference.htm&type=5

Workaround
You can use /* comment */ syntax in query activities for comments.

Reported By (0)

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.