I have a file with some empty fields like this: (first column being primary key- a1,b1,b2)
a1,b,,d,e
b1,c,,,,e
b2,c,c,,
I have already present in table like
a1,c,f,d,e
Now for this key a1 using replace option and lad data infile I want final output like:
a1,b,f,d,e
Here c in second column has been replaced by b, but f has not been replaced by empty string.
To make it clear: Replace field if an actual value is present in file if an empty field is present, retain the old value.