# Create CSV file from MSSQL-Plus stored procedure?

**URL:** <https://discourse.nodered.org/t/create-csv-file-from-mssql-plus-stored-procedure/49516>\
**Category:** General\
**Created:** [9 August 2021 09:17 UTC](https://discourse.nodered.org/t/create-csv-file-from-mssql-plus-stored-procedure/49516 "2021-08-09T09:17:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [9 August 2021 18:11 UTC](https://discourse.nodered.org/t/create-csv-file-from-mssql-plus-stored-procedure/49516/7 "2021-08-09T18:11:48Z")

</div>

> [@grant1](#):
>
> Is there any possible reason why the CSV would only capture the first 4 rows?

If you are looking at the output in the debug node, I believe that node displays only a limited number of characters. See this topic:

> [@The complete msg.payload in Debug - howto](https://discourse.nodered.org/t/the-complete-msg-payload-in-debug-howto/7951/3):
>
> Actually, the option to show the "complete msg object" will not help showing such a long string... it is there to show the top level fields that are defined on the incoming msg object (topic and payload are just two of those fields, but there are others). There is a section in settings.js that will allow you to show longer data fields in the debug sidebar: // The maximum length, in characters, of any message sent to the debug sidebar tab debugMaxLength: 1000, Any changes you make to this file…

If you use the file node to output the data, I think you will see the entire dataset.

My CSV Node Configuration:

 ![Screen Shot 2021-08-09 at 1.23.00 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/208ba3ee43ad5879017d8e685f289dfeba56098e.jpeg)

My file node configuration:

 ![Screen Shot 2021-08-09 at 1.23.23 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/5225c7db1d9abaf06a94de2f3304cb36f53c3dfa.png)

---

_[View the full topic](https://discourse.nodered.org/t/create-csv-file-from-mssql-plus-stored-procedure/49516)._
