USA
800 691 9120
UK
01225 704844
We use cookies on our website to analyze website usage and to help secure the website against misuse. Advertising and functional cookies are not used in our site or our web application products.
By clicking “Accept Essential Cookies Only”, you consent to us placing these cookies.
Wrap a SQL statement variable in a Common Table Expression
Adds a WITH clause (Common Table Expression) to the SQL statement variable. The CTE is prepended so the main query can reference it. Use this when you need to factor out a subquery for clarity or reuse within the same statement.
| Parameter | Description |
|---|---|
| cmd | SQL statement variable name |
| Argument 0 | CTE SQL text to prepend |
SqlStatement.AddCTE "SQL statement variable name", "CTE SQL text to prepend"