Save the cumulate data each 8 hours tracking events

This node, like many of the MSSQL nodes are dead& have numerous bugs and don't support parameterised queries.

node-red-contrib-mssql-plus is fully up to date and has many more features.

You will need to remove that dead node & install this one.

1 Like

thanks @Colin, @Steve-Mcl the database type is not mater because i get the same resalut with the csv file what i need just get in debug two outputs with topics one the startTime and the other with StopTime in the @Colin flow
Sorry for the inconvenience

If you want two messages, one with start time and one with stop time then feed the message into a Change node configured to Move msg.payload.startTime To msg.payload and to set the topic to whatever you want, and separately feed it into another Change node set to do the same with stopTime.

It would have saved a lot of time if you had just said at the beginning that you want to save the start time and separately save the stop time.

I am still not certain that we understand what you want. If you actually want start and stop in one line of the csv file then the problem is how you are passing the data to the csv node and how you have configured that node.

I have just looked at the flow you posted earlier where you are writing the data to mssql and see that have used a JSON node on the output of the function I provided. The result of that is to convert the javascript object to a JSON string, which is then written to the database. For what possible reason have you used a JSON node there?
To generate a CSV file feed the function directly into the CSV node so it is given the javascript object, which it will understand.

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