in addition to my question about best solution for csv import i search for validation methods where i get qualified errors using msyql only. Short description:
i import data by LOAD DATA INFILE into a temporary table and then i need to validate this data.
Fatest way would be a select with several filters like:
SELECT * from temp_table WHERE col1 not in (1,2) OR col2 REGEXP '[0-9]+' etc.
Works also. But i would like to know fastest way to save the column why the row is found, maybe with case and a counter ort sth. similar?
So that i can then return a qualified error like: "column x can only consist of y"