Hello Forum !
I want to have the tablename "dbo.Enbxxxx" as an additional parameter
for a procedure like this:
ALTER Procedure prcSucheUNR
(
@UNR int
)
As
set nocount on
SELECT ABRUFNR,
UNR,
STICHTAG,
Datum,
Inhalt
INTO #temp FROM dbo.Enb WHERE UNR = @UNR
For some reason:
@tablename varchar(11),
and: INTO #temp FROM @tablename WHERE .... does not work. :-(
I get the following syntax Error:
Zeile 33: Falsche Syntax in der Nähe von '@tablename'.
I'am sure it is possible but i don't know how.
Greetings