Skip to end of banner
Go to start of banner

Limitation of Macros = true parameter while using nested SQL queries

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Current »

The parameter "macros=true" has a limitation when using the nested SQL queries. For example, the use case below determines:

A SQL query where the output of the outer query is fed as input to the inner query.

select ap.directory_id,
CONCAT('{sql-query:dataSource=SQLSERVER|table=false}
use jiradbnew;
select user_name, directory_id, display_name, email_address, dir.directory_position
from cwd_user usr
join cwd_directory dir on dir."id" = usr."directory_id" and dir."id"= ', ap.DIRECTORY_ID, ' {sql-query}') as "JiraVal"
from cwd_group ap

In this case, if we enable macros=true, the inner query executes first and it won't be able to find a substitution value for "directory_id". Therefore, this query is not executed successfully. 

  • No labels