jack gell
jack gell

Reputation: 195

Why am I getting an error near semi colon (:)?

I have no idea but this is throwing an error i think it is on line "set @al = 2020". I have read the documentation and not seeming to translate over.

begin
declare @al int;
set @al = 2020;

exec dbo.get_egus_trdg_desk_rpt_no_clrg_broker(@al int);
end

Error message:

SQL Error [102] [42000]: Incorrect syntax near ';'.

Upvotes: 0

Views: 499

Answers (1)

Hassan Mansoor
Hassan Mansoor

Reputation: 11

You do not need to use ';' after every line of code. I can successfully generate the following script in SQL Server 2019. Sample Output

Upvotes: 1

Related Questions