I am trying to create a CTE, but I get an error message saying Incorrect syntax.
Please tell me what I'm doing wrong here.
;WITH CTE_Test (ID)
SELECT CAST(id AS VARCHAR(60)) FROM cat_transaction
SELECT ext_reference FROM Patricia.dbo.BUDGET_LINE
It says near incorrect syntax near ';' the second one.
If I remove the second semi-colon it just says incorrect syntax near.... the next thing after the second semi-colon.