# How to change payload from , to . before sending it to a SQL db

**URL:** <https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698>\
**Category:** General\
**Tags:** database\
**Created:** [23 April 2022 21:22 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698 "2022-04-23T21:22:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JzzO](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JzzO](https://discourse.nodered.org/u/JzzO)\
**Post date:** [23 April 2022 21:22 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/1 "2022-04-23T21:22:45Z")

</div>

Hi. maybe this has been answered before.  
I am using different nodes (ds18b20 and rpi-dht22) to get data from sensors.  
these come with eg. 21,22xxxx values - and when pasting the payload to a MSSQL-Plus node to save them to a database I only get the 21 so I guess that I will have to change the payload from 21,22xxxx yo 21.22xxxx - but how do I do that  
Thanks

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 April 2022 21:25 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/2 "2022-04-23T21:25:30Z")

</div>

You could try:

> **[node-red-contrib-string](https://flows.nodered.org/node/node-red-contrib-string)**
>
> Provides a string manipulation node with a chainable UI based on the concise and lightweight stringjs.com.

---

<div class="post-metadata">

**Author:** ![JzzO](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JzzO](https://discourse.nodered.org/u/JzzO)\
**Post date:** [23 April 2022 21:26 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/3 "2022-04-23T21:26:29Z")

</div>

I'll look into that . thanks

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 April 2022 21:27 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/4 "2022-04-23T21:27:58Z")

</div>

(I think) There is/are tricks. If you want ALL of them converted you have to do something else....

Sorry, it's been too long for me needing/using it.

---

<div class="post-metadata">

**Author:** ![JzzO](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JzzO](https://discourse.nodered.org/u/JzzO)\
**Post date:** [23 April 2022 21:53 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/5 "2022-04-23T21:53:22Z")

</div>

Sorry ... my mistake ...  
When I created the column in the SQL db. I made the datatype an INT - and not a decimal.  
now it works 😉 thanks

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 April 2022 22:16 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/6 "2022-04-23T22:16:51Z")

</div>

Mark the tread as `solved` at the bottom of the post that _solves_ the question.

---

<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:** [7 May 2022 22:17 UTC](https://discourse.nodered.org/t/how-to-change-payload-from-to-before-sending-it-to-a-sql-db/61698/7 "2022-05-07T22:17:21Z")

</div>

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