on 02-22-2017 11:09 AM
Hi All,
I am writing a select in XSJS service.
SELECT EVENTID
FROM VALUE_FACT.VF_LOSS_DB
WHERE TO_CHAR(DATE_FROM,'YYYY-MM-DD')=(SELECT MAX(TO_CHAR(DATE_FROM,'YYYY-MM-DD')) FROM VALUE_FACT.VF_LOSS_DB) ORDER BY DATE_FROM ASC
The above select is working fine when am trying to execute in SQL Console .
But if i write the same select in xsjs service it is throwing error.
Error is dberror(Connection.prepareStatement): 260 - invalid column name: YYYY: line 1 col 233 (at pos 232).
Could any body please help me how to rewrite this query to work in xsjs.
Regards,
Shekar
Maybe you aren't escaping the single quote correctly for JavaScript. Can you post your actual XSJS coding?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.