Hello, may I please ask for some guidance... I have an array of data I want to insert into my MSSQL table called 'MyTable', here is the statement I have created:
when you use that node (apart from the many bug fixes & additional features) you get the compiled SQL statement in the debug output to help you see what is going wrong.
If you wish to upgrade...
stop node-red
open a command line prompt & CD to your node-red folder
npm uninstall node-red-contrib-mssql (or which ever derivative you are using)
Colin, i suspect the values are not being rendered into his SQL Statement (I suspect the duplicate violation is a red herring - and why I am asking him to install mssql-plus as it gives you the rendered SQL statement in the output msg object to see what is actually being executed against the SQL Server)
Inside Split No.1 I have two Objects in the Array, each has a key identifier with a corresponding value, it's these values I would like to Inject into my SQL table.
Can you do exactly what I asked & I will see if I can make this work for you by "faking the API call" (since i dont have access to the API, I need ACTUAL data - not a bunch of strings saying [0 … 9])
I got an error with the size of the reply (Body is limited to 32000 characters; you entered 94735.)
Here is the output after the filter node instead:
{"alarms":[{"id":"49cd2d85-0e12-4147-8bfa-444eb43d7a4e","deviceId":"a03394b0-9a49-45c7-afb4-07541a8aba47","label":"Handle Alarmed","message":"Rack Door Handle alarmed for sensor Back Door at NBRK0750 with state ","severity":"CRITICAL","activatedTime":"2020-06-19T10:38:24.199Z"},{"id":"9dadad16-38fe-4ee8-9f65-ada755a97e10","deviceId":"acb8c96e-db30-4b72-bd06-ab8706b43efd","label":"Local Authorization Alarm","message":"Local Authorization alarm for Back Door at NBRK0750","severity":"INFO","activatedTime":"2020-04-29T14:28:57.594Z"}],"offset":"14588213"}