Hi all,
Thanks so much for taking the time to reply!
@Bernardo, OutSystems has been able to parse the {Table} test value just fine; after submitting {Table} as a test value, the correct string ([DATABASE].[dbo].[Table]) appeared in the Executed SQL tab. Putting an OutSystems entity between the brackets - like {Entity} - worked fine, too.
@Nuno, thanks for helping me on the right path! After looking at your post and my stored procedure call (calling [dbo].[StoredProcedure]), I changed my query to [dbo].[@Table]. It still didn't work when I tried to test it with the Test button, but running it 'for real' worked!
@Sravan, I'm sorry I haven't got to testing your solution, after I got it running I had to focus on another issue. Thanks for the help!
TL;DR, using the Test button in the Advanced SQL widget produced errors when trying to call an external database with a variable as the table name, while running the same code/module (in the browser) worked fine.