# Ncd device string data to sql using mssql plus node

**URL:** https://discourse.nodered.org/t/ncd-device-string-data-to-sql-using-mssql-plus-node/14325
**Category:** General
**Created:** [14 August 2019 18:33 UTC](https://discourse.nodered.org/t/ncd-device-string-data-to-sql-using-mssql-plus-node/14325 "2019-08-14T18:33:55Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Pitmaster](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/pitmaster/32/10698_2.png) [@Pitmaster](https://discourse.nodered.org/u/Pitmaster)
#### Post date: [14 August 2019 19:47 UTC](https://discourse.nodered.org/t/ncd-device-string-data-to-sql-using-mssql-plus-node/14325/5 "2019-08-14T19:47:08Z")

</div>

Steve-Mcl,  
I noticed I may have not clarified the item I am trying to get into the db. data.sensor\_name (Temperature/Humidity) is the sensor\_name value.

Thanks for the msg.query info.

Is this what you are referring to for 'full output'?

INSERT INTO [temperaturehumidity] (temp,humidity,nodeID,voltage,SensorName) VALUES (18.86\*1.8+32,29.59,0,3.2940600000000004,Temperature/Humidity)

After looking at it it appears that Temperature/Humidity (the sensor name) is missing ' before and after the value. So it should be 'Temperature/Humidity' to properly go into the sql db. I am assuming I need to append the value to include the apostrophes.

On the separate note you pointed out about temp and humidity data.....

It appears I can get it from either data.sensor\_data.temperature (humidity) or payload.temperature (humidity)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/eb94b24ecf00d5b2981604774584d8e2795ba26e.png)

---

_[View the full topic](https://discourse.nodered.org/t/ncd-device-string-data-to-sql-using-mssql-plus-node/14325)._
