I have a table and the columns on this table contains empty spaces for some records. Now I need to move the data to another table and replace the empty spaces with a N
N
Did you try this?
UPDATE table SET col1 = NULL WHERE col1 = ''
As the commenters point out, you don't have to do ltrim() or rtrim(), and NULL columns will not match ''.
ltrim()
rtrim()
NULL
''