title: Azure Synapse Analytics (formerly SQL DW): data type to store SQL statement
body: <p>I am using a variable in a stored procedure named <code>@Stmt nvarchar(4000)</code> which is holding dynamically generated SQL statement.</p>
  <p>In the next step, I am giving an execution call to <code>dbo.sp_executesql @Stmt;</code></p>
  <p>However, I am facing syntax issues due to incomplete SQL statement string hold by a variable, whenever characters length is getting over 4000 characters.</p>
  <p>What data type should I be using to hold long SQL statements? Any help here is appreciated.</p>