‎2011 Feb 02 4:33 PM
Hi,
We are getting a runtime error while using a dynamic selection. One of the fields has got an apostrophe in the middle of the text and so the condition is returning an error SAPSQL_WHERE_PARANTHESES.
Let's say the value in the field is SCV's. So the WHERETAB is filled as 'SCV's' or `SCV's`. An exception is caught in this case as there is no closing apostrophe.
Let us know if anyone has come across a similar issue and any help is appreciated.
Regards,
Sarves
‎2011 Feb 02 4:59 PM
You have to parse the text that you are concatenating into your dynamic WHERE an replace all occurrences of ' with '' (two single quotes).
Rob
‎2011 Feb 02 4:43 PM
concatenate 'SCV' `'` 's' into var. now try using var in your where clause.
or build a range with option CP, the value in low must be like SCV+S. Later after selecting you can filter it with comparing the apostrophe.
‎2011 Feb 02 4:46 PM
Thanks for the reply
I just gave SVC's as an example. The value will be dynamic it can be abcd's pqrs's or anything like this. and i don't know how many apostrophes will be there for that particular line.
‎2011 Feb 02 4:51 PM
May be you can use ranges where you have to replaace all the apostrophes with *. Then in options you have to use CP.
after select filter the entries based on the actual apostrophe values.
‎2011 Feb 02 4:59 PM
You have to parse the text that you are concatenating into your dynamic WHERE an replace all occurrences of ' with '' (two single quotes).
Rob
‎2011 Feb 02 9:08 PM
Hi Sarves,
as Rob said.
check also the [ORACLE FAQS|http://www.orafaq.com/faq/how_does_one_escape_special_characters_when_writing_sql_queries] or [SQL SERVER u2013 How to Escape Single Quotes|http://blog.sqlauthority.com/2008/02/17/sql-server-how-to-escape-single-quotes-fix-error-105-unclosed-quotation-mark-after-the-character-string/]
Honestly: Before posting here and getting a whole lot of more or less useless comments just use your favorite search engine.
Regards,
Clemens