SQL-string with appendix

Hello,
I try to save values from a smartmeter into a Mysql database.
The smartmeter is a ISKRA eHZ-EDL .
I can see the values at a dashboard so far so good.
Now write the values into to the database did not work.
I get 3 values which are in an array. With a function node I assign the values to 3 variables
This variables are used to fill a SQL string.
In a debug node I see the complete string,

insert into strom (AktVerbrauch, netzbezug, Netzeinspeisung , erfasst, jahr,monat,tag, wochentag ,zeit ) values(158,7919.4357,16755.7367,"2025-2-10 15:42:10",2025,2,10,15,2025-2-10,15:42:10) : msg.payload : array[3]*

The problem is that the string has an appendix like this : msg.payload : array[3]*
My question how can I remove the appendix.
Who can give me an advice Thank you.

Owler

Welcome to the forum @Owler

For MySQL you build your query as msg.topic.

By default the debug node displays just msg.payload but it uses the value of msg.topic as a label.

So what you are just seeing is perfectly OK, : msg.payload : array[3] is not part of the query.

This section of your query does not look right, should be some quotes in there.

There is also 9 columns and 10 values in the query.

1 Like

I think you are mis-reading the debug output. To make it clearer, set the debug node to Output Complete Message and you will see more clearly what is there.

Hallo

Thank you all who give me an advice.
I cleared the SQL string and it works,

Owler