# Need help - Syntax MSSQL Insert Statement from a msg.payload

**URL:** https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941
**Category:** General
**Created:** [9 December 2019 09:49 UTC](https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941 "2019-12-09T09:49:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![joachimmm](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@joachimmm](https://discourse.nodered.org/u/joachimmm)
#### Post date: [9 December 2019 09:49 UTC](https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941/1 "2019-12-09T09:49:22Z")

</div>

Hello,

what ist the generell Syntax fo executing a MSSQL insert statement from a msg.payload? I've installed the mssql node. with a fixed value works I have success..

Thank you  
jo

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [9 December 2019 10:09 UTC](https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941/2 "2019-12-09T10:09:07Z")

</div>

Which MSSQL node have you installed? There are a few in the library.

I would assume you provide the SQL statement as a string in msg.payload, and leave the field blank in the node itself.

What have you tried so far?

---

<div class="post-metadata">

### Author: ![joachimmm](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@joachimmm](https://discourse.nodered.org/u/joachimmm)
#### Post date: [9 December 2019 10:44 UTC](https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941/3 "2019-12-09T10:44:35Z")

</div>

i've installed the node-red-node-mysql. A simple template node with "INSERT INTO `w1-power-keller` (`power`) VALUES ('111');" works. instead of 111 I would like to have a value from a msg. payload.

Thank you

---

<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: [9 December 2019 20:17 UTC](https://discourse.nodered.org/t/need-help-syntax-mssql-insert-statement-from-a-msg-payload/18941/4 "2019-12-09T20:17:06Z")

</div>

If you look at the info tab for the template node it shows you how to insert msg.payload into the result.
