U kunt OPENROWSET niet parametriseren (of OPERNQUERY enz.). Alleen constanten.
Declare @Var = 'C:\myPC.file';
Declare @SQL varchar(1000);
SET @SQL = 'SELECT * FROM OPENROWSET(BULK ''' + @Var + ''', SINGLE_BLOB)';
EXEC (@sql)
U kunt OPENROWSET niet parametriseren (of OPERNQUERY enz.). Alleen constanten.
Declare @Var = 'C:\myPC.file';
Declare @SQL varchar(1000);
SET @SQL = 'SELECT * FROM OPENROWSET(BULK ''' + @Var + ''', SINGLE_BLOB)';
EXEC (@sql)