Need help!
I am waiting 2 groove Rio to arrive in the meantime I am working in the project that consist to capture the machine cycles and hours of operation, There are two nodes that can work in my project but for a particular reason that I don’t understand is when using both ( counter and hourglass nodes ) with mssql there is a message showing syntax error, I have used the node mssql in another projects sending vibration data to a mssql with no problem, can anyone tell me what I am doing wrong.
Please expand both payloads in the debug tab and take another screenshot.
Also if you can help us understand which debug tab message belongs to which debug node, that would really helpful.
With them folded up like they are, we cant see what the JSON structure is like.
Looks like the issue has nothing to do with the top 11 nodes, so the focus can be on the bottom 7?
The error is because the count value is larger than what fits in the integer data type. You will need to use a BIGINT in your database to fit that number.
Yes also in the mssql node I change to bigint in declare
I have been struggling almost a week and I was wondering if there is a different way to do this since it’s no working, I have try with other counters for example countula and also the same issue.
The debug shows the error near ;
I would try and remove the ; after the count and place it after the insert at the end. (Or use two, one in each location).
Have you tried just inserting the payload rather than doing the set @count thing?
Seems to be double handling and I am not sure why that’s required.
Something like this perhaps (don’t copy paste this, use it as a guide only)…
INSERT INTO ciclo (count, TimeStamp) VALUES ( ‘{{{msg.payload}}}’. CURRENT_TIMESTAMP);
EDIT, also, I know the line feed / carriage returns are probably Ok in the insert statement, but they make me uncomfortable / question if they really are Ok, so try putting in one flat line.