Search code examples
azure-synapseparallel-data-warehouse

WaitFor Delay not working in Azure SQL DW


I am trying to run this simple code in SSMS connected to Azure SQL DW and it fails. I have tried some different variation but none of them seems to be working.

BEGIN
PRINT 'Hello ';
WAITFOR DELAY '00:00:02'
PRINT 'Another';
END

Msg 103010, Level 16, State 1, Line 47
Parse error at line: 2, column: 16: Incorrect syntax near ';'.

Solution

  • Correct. At the moment the WAITFOR statement isn't supported in Azure SQL DW. Note on the documentation for this statement near the top it says whether this statement "applies to" Azure SQL DW.

    Please vote for this feature suggestion to help Microsoft prioritize this enhancement.

    It may not help you much, but you can connect to the master database under a separate connection and run the WAITFOR statement.