Hi, I am trying to create custom sql with sql query “SELECT LE_ID, LEGAL_NAME FROM MV_SCI_ENTMT_REFRESH WHERE LE_ID IN ?”
and passing input as (‘1111’,‘2222’,‘3333’) in a variable. but I am get invalid number exception.
It seems customSQL does not support IN. You go for dynamicSQL.
SELECT LE_ID, LEGAL_NAME FROM MV_SCI_ENTMT_REFRESH WHERE LE_ID IN ${INPUT_FIELD_NAME}.
But use dynamicSQL with caution, copied from JDBC Adapter Guide:
JDBC Adapter does not validate the input parameters of a DynamicSQL service for any malicious SQL injections. When you use a variable input parameter such as the text ${INPUT_FIELD_NAME} in a DynamicSQL service, you must take extra measures to avoid potential security risks by, for example, using a wrapper service for your DynamicSQL service that will validate the variable input parameters.
Could not run ‘new_Select_adapterService_CustomSql’
com.wm.pkg.art.error.DetailedServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service BPM_409377:new_Select_adapterService_CustomSql.
[ADA.1.316] Cannot execute the SQL statement “select * from dbo.Address$ where addressline1 like ${AddressLine1}”. "
(S1093/0) The index 1 is out of range."
The index 1 is out of range.
Server error occurred
Launch completed: 2014-04-09 12:27:39.317
Please give me solution as i am very new in custom sql.