# UDT Query tag not behaving as expected

**URL:** <https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 31, 2025, 2:21pm UTC](https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861 "2025-10-31T14:21:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torsten\_Giesbrecht1](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@Torsten\_Giesbrecht1](https://forum.inductiveautomation.com/u/Torsten_Giesbrecht1)\
**Post date:** [October 31, 2025, 2:21pm UTC](https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861/1 "2025-10-31T14:21:28Z")

</div>

I’ve got the following UDT:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/9/d9ba4db8e0791c2e1c2b88b560f7bcb47a097cc3.png)

I get the following error in my instance: `Error_ExpressionEval("Unknown column 'Winnipeg' in 'where clause'")`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72eb410aa63800620a79653130af42ef8865b00d.png)

But if I use

```sql
SELECT id FROM sites WHERE name = "Winnipeg"

```

I get the right value.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [October 31, 2025, 2:22pm UTC](https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861/2 "2025-10-31T14:22:00Z")

</div>

Wrap the tag in quotes?

---

<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:** [October 31, 2025, 2:29pm UTC](https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861/3 "2025-10-31T14:29:38Z")

</div>

In single quotes.... Double quotes for string constants are only supported for MariaDB and friends, and only when **not** in standards-compliant mode.

---

<div class="post-metadata">

**Author:** ![Torsten\_Giesbrecht1](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@Torsten\_Giesbrecht1](https://forum.inductiveautomation.com/u/Torsten_Giesbrecht1)\
**Post date:** [October 31, 2025, 2:42pm UTC](https://forum.inductiveautomation.com/t/udt-query-tag-not-behaving-as-expected/111861/4 "2025-10-31T14:42:15Z")

</div>

That did the trick thank you!
