# Sending CSV Data to MSSQL Server

**URL:** <https://discourse.nodered.org/t/sending-csv-data-to-mssql-server/24922>\
**Category:** General\
**Created:** [16 April 2020 06:14 UTC](https://discourse.nodered.org/t/sending-csv-data-to-mssql-server/24922 "2020-04-16T06:14: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:** [20 April 2020 08:20 UTC](https://discourse.nodered.org/t/sending-csv-data-to-mssql-server/24922/4 "2020-04-20T08:20:19Z")

</div>

Well for starters your SQL is complete nonsense.

Start simple.

1. Use a SQL tool (like microsoft sql server management studio) and get a simple SELECT working

2. Copy there working SQL to an MSSQL node and ensure it works

3. Try building the dynamic where clause using {{{mustache}}} syntax (and read the help info and examples provided in the side bar info panel for the MSSQL-PLUS node)

Edit...  
The connection is probably not setup correctly either (that's why you're getting connection errors)

Try this simple query

```auto
select getdate() as 'servertime'

```

⬆ that query should work on any MS SQL server without having to know what databases or tables it has. Use that as a simple test query to ensure your connection settings are correct.

---

_[View the full topic](https://discourse.nodered.org/t/sending-csv-data-to-mssql-server/24922)._
