I apologize in advance for the inane question, but I have been unable to figure this out on my own. I know it has to be something simple, but I am stuck. Any help would be greatly appreciated.
We have a space called "advancedfixtures". If I create a blank page and insert the following Wiki markup in it, the results are correctly displayed as a table:
{sql:datasource=Vipre}select * from kaseya_combined where groupname like '%advancedfixtures%' {sql}
However, if I try to move this code to a macro and insert the macro in a Wiki page, I get nothing back:
## @noparams
{sql:datasource=Vipre}
select * from kaseya_combined where groupname like '%advancedfixtures%'
{sql}
Ideally, I would like to create a generic macro that can be used in all spaces, where the spacekey gets inserted into the SQL query:
## @noparams
#set($spacekey= $paramspacekey)
## Check for valid space key, otherwise use current
#if (!$spacekey)
#set ($spacekey=$space.key)
#end
{sql:datasource=Vipre}
select * from kaseya_combined where groupname like '%$spacekey%'
{sql}
Thanks in advance,
Jim Lancaster
Dallas, TX