Using variable in export merge Statement in Automation Designer

I triy to automate the export of two table linked with another,

I first set variable sql= SELECT * FROM something

the I try in export dataset, to set Merge Statements: %sql%

But it didn’t seems to work…
Can anybody help ?