MySql insert from one table to another where a field not null -
i have table "phonebook" has 1.5m records, of records have "phonenumber" field empty.
i want copy records "phonenumber" field not empty table. due seems simple, cant work.
here code:
insert phonebook2 (company,zip,city,address,tags,phonetype,phonearea,phonenumber) select company,zip,city,address,tags,phonetype,phonearea,phonenumber phonebook phonenumber != null && phonenumber != "";
i dont error, "0 rows affected". in manual search on records, see null values phonenumber.
any suggestions ?
** have tried running same query without part , transfer records should.
use is not null
instead of != null
.
source: mysql manual
Comments
Post a Comment