# OPC UA to SQL Problem

**URL:** https://discourse.nodered.org/t/opc-ua-to-sql-problem/63550
**Category:** General
**Tags:** database, function-node
**Created:** [7 June 2022 07:56 UTC](https://discourse.nodered.org/t/opc-ua-to-sql-problem/63550 "2022-06-07T07:56:54Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [7 June 2022 08:02 UTC](https://discourse.nodered.org/t/opc-ua-to-sql-problem/63550/4 "2022-06-07T08:02:24Z")

</div>

> [@DiveDeepNorway](#):
>
> ![error 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1cfab9cb1cbcc8064c678f9f944382b2f5253fdd.png)

As you can see from the image, that is NOT valid SQL.

Also, I would strongly recommend using parameters to both simplify this and avoid SQL Injection

Here is a demo I did on another thread: [Dashboard and MS SQL database - number and text input nodes - #2 by Steve-Mcl](https://discourse.nodered.org/t/dashboard-and-ms-sql-database-number-and-text-input-nodes/55696/2)

---

_[View the full topic](https://discourse.nodered.org/t/opc-ua-to-sql-problem/63550)._
