Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner sql with Ampersand substitution does't return a result

Peter Brodt February 16, 2022

Hi,

I try to find out via (Jira-) Scriptrunner sql, if a confluence space exists or not.

The sql works fine as long as no Ampersand is part of the name.

I therefore replaced '&' with chr(38).

row = sql.firstRow("select count(*) from spaces where spacename = 'Jira ' || chr(38) || ' Confluence bei der R+V'")

Exactly the same sql runs fine and returns "1" in sqldeveloper. But when I execute the sql in my groovy script it returns "0".

Any ideas?

Peter

1 answer

0 votes
Peter Brodt February 16, 2022

forget everything I wrote. 

I had a typo in my script. Everything works fine.

Suggest an answer

Log in or Sign up to answer