MySQL Data Logging Issue

The problem you have is you are trying to insert 70 in to a field you defined as decimal(10,9) which has one digit to the left of the decimal point and 9 to the right.

You can't stuff something bigger into the container you have defined.

(Don't you hate it when the computer does what you told it to do but not what you wanted to do :grin:)

WARN:

insert into tblDB1_Test (Word0,Word2,Word4,Word6,Word8,LastUpdatedOn,LastUpdatedBy)
values (25,53,60,29,90,Now(),'Admin')

Error:
Error: ER_WARN_DATA_OUT_OF_RANGE: Out of range value for column 'Word0' at row 1"

Check my previous post, you may have missed it.

Sorry, Yesterday i could not respond to your post because per day i have limit of 20 post :slight_smile:
Issue has been fixed and it is related to SQL Data Type mapping.

Thank you so much for your support :slight_smile:

Hi Steve,
Sorry, Yesterday i could not respond to your post because per day i have limit of 20 post :slight_smile:
Issue has been fixed and it is related to SQL Data Type mapping.

Thank you so much for your support :slight_smile:

Hi Steve,
For the following query, Hardware sending value of Float (like 19.657657666) but query converting this into INT. (Data type is Float in table) and 19 value is inserting to table.
Data type may be STRING, INT, BOOL, FLOAT

//Query

var data = msg.payload;
msg.topic = insert into tblDB1_Test (Word0,Word2,Word4,Word6,Word8,LastUpdatedOn,LastUpdatedBy) values (${data.Word0},${data.Word2},${data.Word4},${data.Word6},${data.Word8},Now(),'Admin');
return msg;

For the following query, Hardware sending value of Float (like 19.657657666) but query converting this into INT. (Data type is Float in table) and 19 value is inserting to table.

Data type may be STRING, INT, BOOL, FLOAT

//Query

var data = msg.payload;
msg.topic = insert into tblDB1_Test (Word0,Word2,Word4,Word6,Word8,LastUpdatedOn,LastUpdatedBy) values (${data.Word0},${data.Word2},${data.Word4},${data.Word6},${data.Word8},Now(),'Admin') ;
return msg;

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