Place your SQL statement as normal, but where you want to use the global variable use the following: (?)
For example: select * from
where id=(?)
Then select the "parameters" button and assign the global variable by parameter. This will go in order if you have more than one global variable to assign in your sql statement.