When I run the this select '$(''test'')'
in SQL Management Studio 2008 it returns $('test')
When I run sqlcmd -S SERVER -E -d DATABASE -q "select $(''test'')"
on the command line it returns Sqlcmd: Error: Syntax error at line 1 near command '''.
If I remove the dollar sign it works. Is the "$" a special character?
Is this a sqlcmd bug? How can I change the script to get the desired result.