I know, this is a duplicate question of this question. But i encountered the same problem and maybe i can provide some more available informations.
If i try out the following example query:
DECLARE @_Files TABLE (ID INT, Filename VARCHAR(MAX));
DECLARE @_Errors TABLE (ID INT, Label VARCHAR(MAX), Value VARCHAR(MAX));
insert into @_Files
select 73, 'abc'
insert into @_Errors
select 73, 'Some label name', 'Just a value'
select
*
from
@_Errors
inner join @_Files
on @_Errors.ID = @_Files.ID
I got the error message:
The @_Errors-scalar variable must be declared.
The @_Files-scalar variable must be declared.
I'm using SQL-Server 2008 R2 Express and it is running at compatibility level 100. So any ideas why i get this error?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…