Split string into two columns by dash
Hi All,
I have got thisworking
decode(SUBSTR(ADDR2_ATTR_1,1,INSTR(ADDR2_ATTR_1,'-')-1),'9999',NULL,(SUBSTR(ADDR2_ATTR_1, 1, INSTR(ADDR2_ATTR_1,'-')-1))),
decode(SUBSTR(ADDR2_ATTR_1, INSTR(ADDR2_ATTR_1,'-' )+1),'9999',NULL,(SUBSTR(ADDR2_ATTR_1, INSTR(ADDR2_ATTR_1,'-')+1)))
but results came a little different.
It came up as
Col1 for 8 - 10 have came up beauiful ...but however the data at Col2 should be in Co1 and have transferred to Col2
Col1 Col2
<null> 10
<null> 33
8 10
Any guidance is much appreciated.