c*******o 发帖数: 1722 | 1 have a huge dataset. dumped for 7 hours. unfortunatley, had a small mistake.
here is the problem.
col_1 is a string and col_2 is also a string but very similar to col_1. The
only difference is that col_2 has one or two more charactors than col_1. I
only need to keep the last one or two charators of col_2. How do I do it?
Here is an example:
I now have:
col_1 col_2
1string 1string1
2string 2string23
what I want:
col_1 col_2
1string | c*******o 发帖数: 1722 | 2 got this figured out myself. this is an easy one.
update tbl_a
set col_2 = (select replace(col_2, col_1, ''));
mistake.
The
【在 c*******o 的大作中提到】 : have a huge dataset. dumped for 7 hours. unfortunatley, had a small mistake. : here is the problem. : col_1 is a string and col_2 is also a string but very similar to col_1. The : only difference is that col_2 has one or two more charactors than col_1. I : only need to keep the last one or two charators of col_2. How do I do it? : Here is an example: : I now have: : col_1 col_2 : 1string 1string1 : 2string 2string23
|
|