# Error running CTE in the database query browser

**URL:** <https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363>\
**Category:** Ignition\
**Created:** [September 24, 2024, 1:32pm UTC](https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363 "2024-09-24T13:32:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [September 24, 2024, 1:32pm UTC](https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363/1 "2024-09-24T13:32:37Z")

</div>

Says I can't run in read only mode even if I am not in read only mode.

I believe I was able to run CTE queries in the database query browser before though.

Anyone come across this before or know of a setting that might have got flipped?

---

<div class="post-metadata">

**Author:** ![Barnaby\_Sharp](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@Barnaby\_Sharp](https://forum.inductiveautomation.com/u/Barnaby_Sharp)\
**Post date:** [September 24, 2024, 1:41pm UTC](https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363/2 "2024-09-24T13:41:06Z")

</div>

have you tried setting the query type to select rather than auto?

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [September 24, 2024, 1:44pm UTC](https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363/3 "2024-09-24T13:44:14Z")

</div>

Thanks, that worked.

I don't remember having to do that before or auto being update. Thanks so much.

Was it always that way or is that something new?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 24, 2024, 2:02pm UTC](https://forum.inductiveautomation.com/t/error-running-cte-in-the-database-query-browser/96363/4 "2024-09-24T14:02:50Z")

</div>

I don't recall what version introduced that selector, but before that it was always "auto". If the query doesn't **literally** start with `SELECT`, "auto" picks "update". Since CTEs start with `WITH`, they'd be misidentified as updates.
