# Pass MultiQuery to MSSQL-PLUS

**URL:** https://discourse.nodered.org/t/pass-multiquery-to-mssql-plus/80454
**Category:** General
**Created:** [10 August 2023 08:04 UTC](https://discourse.nodered.org/t/pass-multiquery-to-mssql-plus/80454 "2023-08-10T08:04:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mohamed\_1711](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mohamed\_1711](https://discourse.nodered.org/u/Mohamed_1711)
#### Post date: [10 August 2023 08:04 UTC](https://discourse.nodered.org/t/pass-multiquery-to-mssql-plus/80454/1 "2023-08-10T08:04:41Z")

</div>

I want to minimize my code :  
I have function has two query and I want to pass this two query to one MSSQL-plus and get 2 output  
from MSSQL-plus

---

<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: [10 August 2023 08:16 UTC](https://discourse.nodered.org/t/pass-multiquery-to-mssql-plus/80454/2 "2023-08-10T08:16:26Z")

</div>

You risk complicating your code by performing 2 queries in 1.

Are the queries related? Can you not simply return 2 rows based on a single query?

Alternatively, create a stored procedure that returns what you need?

Lastly, if you MUST, then add your 2 queries and set the `Output Type` to "driver" mode and see what you get in a debug node set to **Show Complete Message**

---

<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 October 2023 08:16 UTC](https://discourse.nodered.org/t/pass-multiquery-to-mssql-plus/80454/3 "2023-10-09T08:16:48Z")

</div>

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