Hi!

I'm  wondering if there is a way to query MSSQL in apache drill (version 1.19) 
to get a given number of rows.
For instance I tried this select-statement:

SELECT * FROM bp.BPASession order by startdatetime desc limit 2

Which cause the following error:

org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: The 
JDBC storage plugin failed while trying setup the SQL query. Sql: SELECT * FROM 
"dbo"."BPASession" ORDER BY CASE WHEN "startdatetime" IS NULL THEN 0 ELSE 1 
END, "startdatetime" DESC FETCH NEXT 2 ROWS ONLY Plugin: bp Fragment: 0:0

Without Limit 2, it work correctly:
SELECT * FROM bp.BPASession order by startdatetime desc

I appreciate any kind of help!


Med vänliga hälsningar

Naser Khodabin

GÖTEBORGS STAD
Intraservice, enheten IT-projekt och -portfölj
Mobil: 076 -2060289
E-post: 
[email protected]<mailto:[email protected]>
Postadress:  403 31 Göteborg
Besök: Rosenlundsgatan 4
www.goteborg.se<http://www.goteborg.se/>

Reply via email to