SQL User parameters %(name)s not prompted

have  very simple query

WHERE (%(acct_name)s is NULL or a.short_name = %(acct_name)s)

I have setup a User Parameter like so

%\((\w+)\)s

enabled for all languages, and both checkboxes checked; however when trying to run this query in Console - not getting prompted for the parameter value (i.e. acct_name)

4 comments
Comment actions Permalink

Also tried the following - still no luck

%\(([^\)]+)\)s
0
Comment actions Permalink

if i place the query into a separate foo.sql file, then I do get prompted for parameter.

0
Comment actions Permalink

Hello Yelena,

It works for me, see the screenshots:

What PyCharm version are you using? Have you configured SQL dialect for the file? Do you see error marks in sql injected string?

Make also sure that Always review parameters before execution settings is enabled.

1
Comment actions Permalink

Hi Yelena,

Did you manage to solve this? I'm seeing the same thing right now too just after upgrading to PyCharm 2016.3

0

Please sign in to leave a comment.