Question
Endeavour Energy
AU
Last activity: 13 May 2019 8:18 EDT
Issue in passing datetime value to Connect SQL Rule which connects to MSSQL Database
Hi All,
I was trying to pass datetime value to the Query in Connect-SQL. I have tried the below ways
1. {pagename.property}
2. CAST('{pagename.property}' as datetime)
3. CONVERT(DATETIME,'{pagename.property}')
value of pagename.property is something like "2019-01-29 12:50:37.000" or "2019-01-29 12:50:37"
didnt use To_Date as it is MSSQL Database.
When traced, i can see the value being passed properly and also when given hardcoded value, Connect-SQL was able to return results without any issues.
Getting error: Caused by SQL Problems. Problem #1, SQLState S1093, Error code 0: com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out off range. at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:257) at .....
Regards,
Sowjanya