I have wrriten a vbs macro to automatically insert values from a DDE Excel sheet to a DB table.
The problem, is that some of the cells are empty
so the query turns out :
INSERT INTO `stock_realtime` (`fkstock`, `benefit_month`)
VALUES (77, '')
ON DUPLICATE KEY UPDATE `benefit_month` = '', `created` = NOW();
But my sql table contains default values of ‘0’ just for cases like this when the value is empty.
Still it errors Incorrect integer value:'' for column 'benefit_month' at row 1'
The other (full) queries work fine.
” is NOT empty (numeric) value, NULL is.