# MySQL data transfer to MSSQL

**URL:** <https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736>\
**Category:** General\
**Tags:** database\
**Created:** [26 October 2021 05:51 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736 "2021-10-26T05:51:56Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [26 October 2021 12:02 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/21 "2021-10-26T12:02:39Z")

</div>

SQL Management Studio

---

<div class="post-metadata">

**Author:** ![idlvpfk](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@idlvpfk](https://discourse.nodered.org/u/idlvpfk)\
**Post date:** [26 October 2021 12:17 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/22 "2021-10-26T12:17:29Z")

</div>

Im feeling really dumb right now ( probably im) , but i dont get it...  
You would like to see template node code executed in SMS?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [26 October 2021 12:22 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/23 "2021-10-26T12:22:10Z")

</div>

write `USE "DB-NAME"` before the query (the first line)

---

<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:** [26 October 2021 13:09 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/24 "2021-10-26T13:09:01Z")

</div>

> [@idlvpfk](#):
>
> just checking if message is reaching debugger..

As I asked right at the start

> [@Colin](#):
>
> Have you got a debug node directly on the output of the Mysql node?

To which the answer was No!

Whenever something is not working, always work back from where the problem is seen to find at what point it goes wrong.

---

<div class="post-metadata">

**Author:** ![idlvpfk](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@idlvpfk](https://discourse.nodered.org/u/idlvpfk)\
**Post date:** [26 October 2021 13:10 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/25 "2021-10-26T13:10:13Z")

</div>

(1 row affected)  
and when i try to execute 2nd time:  
Commands completed successfully.  
Only column i changed is date, as it converts to very long string.  
after pasting this command (without) USE DB into node , still im gettings NULL's everywhere.  
Can problem be in MSSQL-PLUS config?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [26 October 2021 13:12 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/26 "2021-10-26T13:12:45Z")

</div>

I don't write any command in the mssql plus node.  
the command is in the template - so this might be the reason.

remove any command you have written in mssql node - and just use the command we used in template.

mssql should use `payload` as the command

I think the command passed in from template is not getting used, as its using its own command, which might not be yielding any values

---

<div class="post-metadata">

**Author:** ![idlvpfk](https://avatars.discourse-cdn.com/v4/letter/i/3be4f8/32.png) [@idlvpfk](https://discourse.nodered.org/u/idlvpfk)\
**Post date:** [26 October 2021 13:26 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/27 "2021-10-26T13:26:35Z")

</div>

Yes, it is working as expected with clean MSSQL-node!!!  
Marcus, you are hero of the day! Without your solutions, I couldn't achieve this important flow for my project! Thank you very much for your effort!  
Thanks @Colin for your engage!  
And again its proven that node-red is borderless in any case/scenario!

p.s. now I have to clean up my flow, understand it and ofcourse testing testing testing!

Have a nice life guys!

---

<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:** [9 November 2021 13:27 UTC](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736/28 "2021-11-09T13:27:17Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/mysql-data-transfer-to-mssql/52736.md?page=1)
