Named query incorrectly returning no records

Running a named query with 1 string parameter, through the query editor, tab . . .

The Named Query incorrectly returns 0 records when I provide a ‘Value’ in the ‘Testing’ tab and use the ‘Execute Query’ button

The same Named Query correctly returns 1 record when I hard code the parameter’s value into the body of the query and use the ‘Execute Query’ button

Has anyone heard of this odd behavior?

Long shot but did you press enter after entering the value in the Testing tab to commit the change? I know this has tricked me before.

1 Like

One other suggestion - if you are using a value parameter of the string data type, it will interpret a quote character as literal quote in the Testing tab. The quotes must be omitted if your data does not actually contain quotes:

2 Likes

Yes. I’ve used the ‘enter’ key, saved, opened, and closed the named query. I’ve also copied the named query, then recreated the named query from scratch thinking somehow something internal may have been corrupted or something, no help.

Yes, that was what I was doing. Thanks!

1 Like