I am using a database picker field custom field and I would like to show only the project codes for a given project that is selected for the given issue I am previewing. For example, I am using for preview issue RDJ-7402, so I would like to show the corresponding project codes for the project RDJ only.
I am using the following SQL code in the connection and it is working as you can see in the screenshot.
select p.*, i.*
from iTrac_products_projects i inner join project p
on p.pkey = i.code
However, I am using almost the same code in the Retrieval/validation SQL of my database picker and it is not working, I am receiving the error: "The SQL statement should have exactly one parameter marker"
select i.code , i.code + ' [' + i.name + ']', i.iTracProject , p.pkey
from iTrac_products_projects i inner join project p
on i.code = p.pkey