# Parameter Validation Failure:
SQL Query - Malformed SQL Statement: Expected token 'WHEN' but found Keyword with value 'LIMIT' instead at position 24.
Statement:SELECT \* from Case LIMIT 1

**URL:** <https://matillioncommunity.discourse.group/t/parameter-validation-failure-sql-query-malformed-sql-statement-expected-token-when-but-found-keyword-with-value-limit-instead-at-position-24-statement-select-from-case-limit-1/2491>\
**Category:** Matillion ETL\
**Created:** [October 29, 2024, 12:00pm UTC](https://matillioncommunity.discourse.group/t/parameter-validation-failure-sql-query-malformed-sql-statement-expected-token-when-but-found-keyword-with-value-limit-instead-at-position-24-statement-select-from-case-limit-1/2491 "2024-10-29T12:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shameershaikh44](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@shameershaikh44](https://matillioncommunity.discourse.group/u/shameershaikh44)\
**Post date:** [October 29, 2024, 12:00pm UTC](https://matillioncommunity.discourse.group/t/parameter-validation-failure-sql-query-malformed-sql-statement-expected-token-when-but-found-keyword-with-value-limit-instead-at-position-24-statement-select-from-case-limit-1/2491/1 "2024-10-29T12:00:00Z")

</div>

Hello Everyone,

I am getting this error in a component in matillion job.

Let me know if you need more inputs.

&nbsp;

Thank you.

---

<div class="post-metadata">

**Author:** ![ClaireSeniorCommunityManager](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@ClaireSeniorCommunityManager](https://matillioncommunity.discourse.group/u/ClaireSeniorCommunityManager)\
**Post date:** [November 1, 2024, 11:33am UTC](https://matillioncommunity.discourse.group/t/parameter-validation-failure-sql-query-malformed-sql-statement-expected-token-when-but-found-keyword-with-value-limit-instead-at-position-24-statement-select-from-case-limit-1/2491/2 "2024-11-01T11:33:45Z")

</div>

Hi [@shameershaikh44](https://matillioncommunity.discourse.group/u/shameershaikh44)​ and I'm sorry to hear you're getting an error. Can you let me know which component you're having this error in and anything else of note so we can try to help you further?

Many thanks,

Claire

---

<div class="post-metadata">

**Author:** ![sophie.nevanen](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@sophie.nevanen](https://matillioncommunity.discourse.group/u/sophie.nevanen)\
**Post date:** [November 5, 2024, 8:54am UTC](https://matillioncommunity.discourse.group/t/parameter-validation-failure-sql-query-malformed-sql-statement-expected-token-when-but-found-keyword-with-value-limit-instead-at-position-24-statement-select-from-case-limit-1/2491/3 "2024-11-05T08:54:33Z")

</div>

Hi [@shameershaikh44](https://matillioncommunity.discourse.group/u/shameershaikh44)​

Is the name of the table on which your query applies "case"? I think it should be renamed or at least enclosed in quotes. it is interpreted here as a case when function.
