Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ksc_run_sql QUERY_STRING Apostrophe error's

Highlighted
jpeter37
Occasional Advisor

ksc_run_sql QUERY_STRING Apostrophe error's

We are running into an error when the user puts an apostrophe (') in the Program name. When this gets resolved in the execution step it sees that as the end of the line. Then of course it errors when it finds more data after that. Here is the error I am getting.

Invalid command condition. Could not evaluate: 'APP Scan (WebInspect) for
MikeM's PKI Server' IS NULL (KNTA-10216)

Basically it is seeing that ' in MikeM's name and it thinks that is the end. Any Ideas how to get around this issue when using the ksc_run_sql?
1 REPLY
Srujan Gudisa
Occasional Contributor

Re: ksc_run_sql QUERY_STRING Apostrophe error's

I tried the following, and it worked good. May be you can try
--------------------------------------------
ksc_itg_run_sql QUERY_STRING="Select 'APP Scan (WebInspect) for MikeM''s PKI Server' from dual where 'APP Scan (WebInspect) for MikeM''s PKI Server'is not null"

ksc_store FIELD_1=[SQL_OUTPUT]
-------------------------------------------
In oracle, if a value has a apostrophe in middle of the field, it should be managed by commenting it by keeping one more apostrophe beside it.

I believe the user field which have chances of having apostrophe, it should be managed to add comment beside it.

please see the above example for it.
//Add this to "OnDomLoad" event