I have a "phone book" table in which there are 1.5 M entries, some of the entries have a "phonenumber" field.
I want to copy all records that the "phonenumber" field is not empty into another table. even if it seems very simple, I cannot get it to work.
here is my code:
INSERT INTO phonebook2 (company,zip,city,address,tags,phonetype,phonearea,phonenumber)
SELECT company,zip,city,address,tags,phonetype,phonearea,phonenumber
FROM phonebook WHERE phonenumber != null && phonenumber != "";
I do not get any errors, but I get "0 lines". in manual search by records, I see NULL values for the call number.
any suggestions?
** I tried to run the same query without the WHERE part, and it transfers all the records as it should.
source
share