Jdbc input- count error


(brian) #1

I'm pulling data from an advantage db, and I'm having issues with the query being run prior to statement I'm setting.

[SAP][Advantage SQL Engine]Unexpected token: LIMIT -- Expecting semicolon. -- Location of error in the SQL statement is: 63: SELECT count(*) AS "COUNT" FROM (SELECT * from test) AS "T1" LIMIT 1
I'm thinking this maybe because there is no ; at the end of the query. Is there a way to force a ; at the end or even better turn off this count prior to the running of a query?

the same sql works fine with a ; when I test manually.


#2

I don't think advantage supports LIMIT 1. It would use "SELECT TOP 1 ...", no?


(brian) #3

When I manually run a query with Limit 1 with JDBC I can get it to work.
SELECT count(*) AS "COUNT" FROM (SELECT * from table) AS "T1" LIMIT 1;
without the ; give me an error.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.