I had an error in my script whereby these two lines did not reference the same table name (I had hard-coded the first location and forgot to update it): I just changed the first line to also get the table name from the variable, and voila So check those two lines in your import SQL file. I receive large datasets as Excel CSV files and use a (WIL) script to convert the.csv file into an importable.sql file. I couldnt even get rid of it by hand-retyping the whole query - I had to put it into NotePad (Encoding menu) and show ANSI and the UTF8 combos and then remove the garbage by hand. Pasting them from LibreOffice into the query window is where (I think) the garbage originated. How did the garbage get in there in the first place I think it was because I made the mistake of copying some long complex queries into LibreOffice Writer (my functional specs document) instead of just bookmarking them in phpMyAdmin or saving them in a text editor. I solved it by wading back into Windows and removing the garbage using NotePad. My problem was the same: invisible characters kiboshing the query and returning the unknown column error. Just remove the text (purchasedate) and rewrite it by hand it should be fine.
0 Comments
Leave a Reply. |