Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to ask if it is possible to update a column values before inserting/loading it onto a table?
Something like in a typical MySQL database trigger, a trigeer before insert
for each row
begin
if (NEW.Col_name = 'values1'l) then
set NEW.Col_name = 'values1updated1'; end if;
if (NEW.Col_name = 'value21'l) then
set NEW.Col_name = 'values2updated'; end if;
if (NEW.Col_name = 'values3'l) then
set NEW.Col_name = 'values3updated'; end if;
end
//
delimiter ;
Or is there any different way to do this?; As I have 1 column with 3 different values depends on the action, that should be updated, before placing/inserting /loading the data on the target destination table to avoid "Data Column Values is too long" as I set the standard data types/sizes on the destination table, with a CHAR(1) and the data from the CSV file having CHAR(3).
Thank you very much for any idea or a solution.
Cheers
Thank you Sir @TRF! ![]()