I can do this in my query:
SELECT * FROM OPENROWSET(BULK 'C:\myPC.file', SINGLE_BLOB)
but how do I do this?
Declare @Var = 'C:\myPC.file'
SELECT * FROM OPENROWSET(BULK @Var, SINGLE_BLOB)
I tried three ''' single quotes, but still says incorrect syntax.
You can not parametrise OPENROWSET (or OPERNQUERY etc). Constants only.