Share via

Incrementally load data from Azure SQL Database to Azure Blob storage

Zhu, Yueli YZ [NC] 280 Reputation points
2023-10-03T14:33:37.0566667+00:00

Hi,

I followed the incremental loading tutorial https://learn.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-portal and changed the "stored procedure" to a script, but it showed an "Incorrect syntax near '06'". Could you please help? Thanks

Following the the query:

UPDATE dbo.watermarktable
SET [WatermarkValue] = @{activity('LookupNewWaterMarkActivity').output.firstRow.NewWatermarkvalue}
WHERE [TableName] = @{activity('LookupOldWaterMarkActivity').output.firstRow.TableName}
Azure SQL Database
Azure Data Lake Storage
Azure Data Lake Storage

An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.

Azure Cloud Services
Azure Cloud Services

An Azure platform as a service offer that is used to deploy web and cloud applications.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author

Amira Bedhiafi 42,936 Reputation points MVP Volunteer Moderator
2023-10-03T15:02:56.8766667+00:00

Try using the single quotes ?

UPDATE dbo.watermarktable

SET [WatermarkValue] = '@{activity('LookupNewWaterMarkActivity').output.firstRow.NewWatermarkvalue}'

WHERE [TableName] = '@{activity('LookupOldWaterMarkActivity').output.firstRow.TableName}'

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Zhu, Yueli YZ [NC] 280 Reputation points
    2023-10-03T15:49:45.9966667+00:00

    As I said before, while I added the single quotes, the script worked. Thanks again!

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.