thank you very much for the answers!I tried the way Tara suggested and it worked. I also learned about the other way with sp_executesql and its parameters. The following is working:exec sp_executesql N'select * from dax2 where [date] = @datum', N'@datum date', @datum = '2000-01-03'
The following does not work:exec sp_executesql N'select * from @tableName', N'@tableName sysname', @tableName = 'INDIZES.dbo.dax2'
What is the reason for that?Thank u very muchLandau