Forum Discussion

SL12345's avatar
SL12345
New Contributor III
2 years ago
Solved

Split string into rows and save it to file row by row, not in one string

Lets say i have this input string in my mapper: "Mercedes;6658;TypeS;2022;\r\nAudi;5558;TypeA8;2022;Diesel" How can i save it to csv file as single rows? in this example it should be: Mercedes;665...
  • jcornelius's avatar
    4 years ago

    @Damone
    do it all in SQL
    ie
    IF EXIST(Select id from table_x where id=@id)
    BEGIN
    UPDATE table_x set col1=@col1 where id=@id
    END
    ELSE
    BEGIN
    INSERT INTO into table_x (id,col1) values(@id,@col1)
    END