# Named query with or without ";" at the end

**URL:** <https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 14, 2024, 9:08am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351 "2024-05-14T09:08:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 14, 2024, 9:08am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/1 "2024-05-14T09:08:22Z")

</div>

I notice when I write my query with ";" at the end it doesn´t show data, when i write it without the ";" it works.

```python
SELECT DISTINCT
    Asset.asset AS "Activo",
    ....
FROM
    Asset
LEFT JOIN ...EquipmentType.EquipmentType
LEFT JOIN ....
WHERE
    Asset.compan...
    CASE
        WHEN SubStr(Asset.businessUnit, 1, 3) IN ('CAT', 'BAL', 'MUR', 'VAL', 'AND', ....
    END,
    Asset.businessUnit,
    Asset.parentAsset,
    Asset.asset

```

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c406a95d2cf4d8e9c20465d400c0690dc997945b.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/b/7b0091c3d89d2b33ee211a636a694aabccb1b8d7.png)  
v  
v  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/e/9ecb328d945340c5218e610c42100bc43bed3ba8.png)

In case is useful for someone

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 14, 2024, 9:16am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/2 "2024-05-14T09:16:04Z")

</div>

1. You might mention which database engine you are using. MySQL, MS SQL, etc.
2. Was there an error message?

> [@Alejandro\_Alaco](#):
>
> ```python
> WHERE
> ...,
> Asset.businessUnit,
> Asset.parentAsset,
> Asset.asset
> 
> ```

1. I've never seen WHERE with no operator (=, !=, \<, \>). Where did you find that syntax?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 14, 2024, 9:26am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/3 "2024-05-14T09:26:42Z")

</div>

It´s Oracle Query,  
happens when I try to adapt the queryes from Ignition Vision to named queries in Ignition Perspective. That syntax I got from the previous project

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1adf794cf6efa47935f33dae8e19e5f97bba9a7d.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 14, 2024, 9:31am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/4 "2024-05-14T09:31:28Z")

</div>

That's new to me. I've never used Oracle.

Anyone else? What's happening here. Is WHERE just looking for non NULLs?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 14, 2024, 9:35am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/5 "2024-05-14T09:35:38Z")

</div>

This is the error:

###### Subcode

Error\_Exception

###### Property

root/TabContainer/TablaInventario.data

###### Description

java.sql.SQLSyntaxErrorException: ORA-00907: falta el paréntesis derecho

tranlation "the right parenthesis is missing."

---

<div class="post-metadata">

**Author:** ![Josue\_Cuadras](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/josue_cuadras/32/59915_2.png) [@Josue\_Cuadras](https://forum.inductiveautomation.com/u/Josue_Cuadras)\
**Post date:** [May 14, 2024, 9:54am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/6 "2024-05-14T09:54:59Z")

</div>

Could you provide the whole code?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 14, 2024, 10:02am UTC](https://forum.inductiveautomation.com/t/named-query-with-or-without-at-the-end/90351/7 "2024-05-14T10:02:47Z")

</div>

ok, i think there is no issue, it´s an Oracle thing, previous code was without ";"
