Using the %25 SQL wildcard after a variable in execSQL

How does one use the % SQL wildcard after a variable name in the execSQL service while using variable substitution.

For Example:
Lets say you want to grab all of the rows in the Authors table where the authors name started with the variable %FirstName%.

  • Assuming /FirstName = ‘Jon’

Intended SQL after variable substitution:
select * from Authors where name like ‘Jon%’

Syntax I’m using (and doesn’t work)
Select * from Authors where name like ‘%FirstName%%’

wM fails to replace %FirstName% with ‘Jon’ because of the SQL wildcard following the variable name. (The second % after FirstName.)

Thanks for the help

I tried with the above string it is working for me.
Make sure you checked perform varibale substitution.