0

I am connecting to our data warehouse via an ODBC connector through Power BI and I have the following statement

SELECT * FROM T_OL_DETL WHERE FY_CD = '2020' LIMIT 10000;

I am getting an error that says "SQL command not properly ended". Any ideas will be greatly appreciated. Alex

Alex
  • 23
  • 1
  • 5
  • Does this answer your question? [SQL command not properly ended when using LIMIT](https://stackoverflow.com/questions/40928825/sql-command-not-properly-ended-when-using-limit) – FoggyDay Mar 25 '21 at 02:01

1 Answers1

2

Oracle doesn't support LIMIT. Instead, you can use:

SELECT *
FROM T_OL_DETL
WHERE FY_CD = '2020' 
FETCH FIRST 10000 ROW ONLY;

Normally, you would only use this with ORDER BY.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786