PDA

View Full Version : SQL Validation error



Jeff Kimmel
13-Sep-2013, 03:45 PM
All,

I have a report that has select filter. In that select filter I am filtering on description & if that description has a open parenthesis "(" without a closing parenthesis I get a SQL validation error when trying to run the report. If I have an open & close parenthesis it works fine. I tested the actual SQL & it works but it looks like whatever pre-processing DAI is doing is not handling this correctly.

Thanks,

Jeff

Bob Cergol
13-Sep-2013, 04:25 PM
Jeff,

This is by design and has to do with preventing SQL injection attacks. I'm no expert on that subject so can't comment on the wisdom of this behavior. I agree it is a bit of a pain, but thankfully it's not often an issue. You might encounter similar problems with other delimiter characters embedded in the data.

The workaround is to make a forumla column on the column containing this data and do a replace on the character and/or add the closing character to balance it.

Sidenote: If you use a formula column that is defined in the report as a filter, you will need to save the report before making it a filter -- at least in preview or apply mode you would otherwise get an error since it doesn't recognize the column yet exists and is available for use as a filter.

Bob