# Hello! I have a problem with my dashboard, im trying to extract from Oracle sql a table based on what i insert in the insert field but i can't get it done. v3.0.2, Windows, docker

**URL:** <https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053>\
**Category:** Dashboard\
**Tags:** database, docker\
**Created:** [21 November 2023 11:03 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053 "2023-11-21T11:03:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanIwnl](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@JanIwnl](https://discourse.nodered.org/u/JanIwnl)\
**Post date:** [21 November 2023 11:03 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/1 "2023-11-21T11:03:03Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0bbf5b36a1529ce103197462e89e69ed2c276dc8.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/250afcc8780f06f7578c72fa20595202801ab49a.png)

```auto
[
    {
        "id": "1f8e6db45193bc52",
        "type": "ui_text_input",
        "z": "42f19ce051f21038",
        "name": "",
        "label": "Insert ID",
        "tooltip": "",
        "group": "45fca58b7714ea8d",
        "order": 1,
        "width": 6,
        "height": 1,
        "passthru": true,
        "mode": "text",
        "delay": "0",
        "topic": "topic",
        "sendOnBlur": false,
        "className": "insert-text",
        "topicType": "str",
        "x": 280,
        "y": 360,
        "wires": [
            [
                "c2e5246ddda832c5"
            ]
        ]
    },
    {
        "id": "c2e5246ddda832c5",
        "type": "function",
        "z": "42f19ce051f21038",
        "name": "function 7",
        "func": "\nvar topic = msg.topic;\nmsg.topic = `select * from cristi_teste_flow where klt_id = 'SSIB5230BE21D'`\nreturn msg;\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 360,
        "wires": [
            [
                "1003cb18009c04b1",
                "6e32373eb060306f"
            ]
        ]
    },
    {
        "id": "1003cb18009c04b1",
        "type": "mysql-r2",
        "z": "42f19ce051f21038",
        "name": "Sql",
        "host": "sdf",
        "database": "",
        "username": "fghj",
        "password": "hgj",
        "sql": "",
        "port": "546",
        "pooling": false,
        "waitForConnections": true,
        "connectionLimit": "10",
        "queueTimeout": "10000",
        "x": 750,
        "y": 360,
        "wires": [
            [
                "5eab8cab6dc92f90",
                "8e9e242d4cee0806"
            ]
        ]
    },
    {
        "id": "8e9e242d4cee0806",
        "type": "ui_table",
        "z": "42f19ce051f21038",
        "group": "b3a85a5f0312fd16",
        "name": "",
        "order": 1,
        "width": 8,
        "height": 4,
        "columns": [
            {
                "field": "id",
                "title": "id",
                "width": "3px",
                "align": "left",
                "formatter": "rownum",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "From Where",
                "title": "From Where",
                "width": "7px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "ID_TYPE Piesa",
                "title": "ID_TYPE Piesa",
                "width": "9px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "KLT_ID",
                "title": "KLT_ID",
                "width": "9px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "KLT_ID_TYPE",
                "title": "KLT_ID_TYPE",
                "width": "9px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "KLT_DATA_CREATED",
                "title": "KLT_DATA_CREATED",
                "width": "11px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "ORDER Tehnic",
                "title": "ORDER Tehnic",
                "width": "17px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "ORDER Logistic",
                "title": "ORDER Logistic",
                "width": "17px",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "TERMINATED",
                "title": "TERMINATED",
                "width": "8px",
                "align": "center",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "LOCKED_COLUMN",
                "title": "LOCKED_COLUMN",
                "width": "10px",
                "align": "center",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 1,
        "cts": true,
        "x": 1190,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "e06287285ddaa001",
        "type": "template",
        "z": "42f19ce051f21038",
        "name": "",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "msg.ui_control={\n \"tabulator\": {\n \"layout\": \"fitData\"\n }\n}\nreturn msg;\n",
        "output": "str",
        "x": 760,
        "y": 500,
        "wires": [
            [
                "114e54c85f5e34e5"
            ]
        ]
    },
    {
        "id": "114e54c85f5e34e5",
        "type": "ui_ui_control",
        "z": "42f19ce051f21038",
        "name": "",
        "events": "all",
        "x": 1020,
        "y": 500,
        "wires": [
            [
                "8e9e242d4cee0806"
            ]
        ]
    },
    {
        "id": "4bc575ec800ff3bf",
        "type": "ui_template",
        "z": "42f19ce051f21038",
        "group": "45fca58b7714ea8d",
        "name": "",
        "order": 3,
        "width": 0,
        "height": 0,
        "format": "<style>\n .insert-button>.md-button {\n width: 100px;\n height: 40px;\n left:10px;\n top:40px;\n }\n\n .tabulator-headers{\n position:relative;\n margin-left:50px;\n }\n\n.nr-dashboard-cardpanel{\nmargin-left:50px\n}\n\n.nr-dashboard-textinput{\nmargin-left: auto;\nmargin-right: auto;\nwidth: 40px;\n}\n.insertKLT{\nposition:relative;\nmargin-left: 200px}\n\n.insert-text> md-input-container{\nfont-size:20px;\nmargin-left:-20px;\nheight:60px;\n\n}\n<style>\n",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 400,
        "y": 500,
        "wires": [
            []
        ]
    },
    {
        "id": "ccb88914b9b7883d",
        "type": "inject",
        "z": "42f19ce051f21038",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 300,
        "y": 260,
        "wires": [
            [
                "c2e5246ddda832c5"
            ]
        ]
    },
    {
        "id": "6e32373eb060306f",
        "type": "debug",
        "z": "42f19ce051f21038",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 700,
        "y": 260,
        "wires": []
    },
    {
        "id": "5eab8cab6dc92f90",
        "type": "debug",
        "z": "42f19ce051f21038",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 260,
        "wires": []
    },
    {
        "id": "45fca58b7714ea8d",
        "type": "ui_group",
        "z": "42f19ce051f21038",
        "name": "Insert KLT",
        "tab": "abdf2904c6495f75",
        "order": 1,
        "disp": true,
        "width": "7",
        "collapse": false,
        "className": "insertKLT"
    },
    {
        "id": "b3a85a5f0312fd16",
        "type": "ui_group",
        "z": "42f19ce051f21038",
        "name": "KLT Table",
        "tab": "abdf2904c6495f75",
        "order": 2,
        "disp": true,
        "width": "8",
        "collapse": false,
        "className": ""
    },
    {
        "id": "abdf2904c6495f75",
        "type": "ui_tab",
        "name": "KLT Dashboard",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [21 November 2023 11:50 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/2 "2023-11-21T11:50:18Z")

</div>

Hi @JanIwnl.

**1. The Database**

> I'm trying to extract from Oracle sql

You seem to be using node-red-mysql-r2 which states

> Prerequisites:  
> A MySQL database instance.

Can this node connect to an Oracle database?  
Or maybe you have an SQL Server database, as your other post implies.  
**What kind of database is it?**

**2. The Query**  
You define an SQL query in your function node:

```auto
msg.topic = `select * from cristi_teste_flow where klt_id = 'SSIB5230BE21D'`

```

According to the documentation for node-red-mysql-r2 it expects

> **msg.sql** : The SQL query to execute.

---

<div class="post-metadata">

**Author:** ![JanIwnl](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@JanIwnl](https://discourse.nodered.org/u/JanIwnl)\
**Post date:** [21 November 2023 12:11 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/3 "2023-11-21T12:11:12Z")

</div>

I'm using the node-red-mysql-r2 because is the only one where i could connect the sql server and for the query i made the changes you provide to me.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [21 November 2023 12:27 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/4 "2023-11-21T12:27:30Z")

</div>

I repeat, what kind of database is it - multiple choice

A Microsoft SQL Server  
B MySQL  
C MariaDB  
D Oracle  
E Postgres  
F InfluxDB  
G SQLite  
H Other (please specify)

---

<div class="post-metadata">

**Author:** ![JanIwnl](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@JanIwnl](https://discourse.nodered.org/u/JanIwnl)\
**Post date:** [21 November 2023 12:38 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/5 "2023-11-21T12:38:04Z")

</div>

I understand now, it is an Oracle database

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [21 November 2023 12:50 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/6 "2023-11-21T12:50:42Z")

</div>

Thanks.

I have never used Node-red with Oracle so I cannot tell if you are using the right node to interface with it.

Maybe there are some Oracle users here who can help?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 November 2023 16:34 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/7 "2023-11-21T16:34:09Z")

</div>

> [@JanIwnl](#):
>
> node-red-mysql-r2

I will be surprised if that node works with an Oracle database, it says it is for MySQL databases.

Did you check to see if any of [these nodes](https://flows.nodered.org/search?term=oracle) do what you want?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 December 2023 16:34 UTC](https://discourse.nodered.org/t/hello-i-have-a-problem-with-my-dashboard-im-trying-to-extract-from-oracle-sql-a-table-based-on-what-i-insert-in-the-insert-field-but-i-cant-get-it-done-v3-0-2-windows-docker/83053/8 "2023-12-21T16:34:12Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
