Data in each record of a column named REQUEST_IP_ADDR is as below '10.247.32.44 | 10.247.32.44'. How do i select only 1st part that is 10.247.32.44 ?
--Below is the select query I am trying to run
SELECT DISTINCT MSG_TYPE_CD, SRC, SRC_IP from MESSAGE_LOG order by MSG_TYPE_CD;
--My table looks as below
MSG_TYPE_CD SRC SRC_IP KB0192 ZOHO 10.247.32.44 | 10.247.32.44 KB0192 ZOHO 10.247.32.45 | 10.247.32.45 KB0192 ZOHO 127.0.0.1 | 10.240.20.137 KB0192 ZOHO 127.0.0.1 | 10.240.20.138 KB0196 GUPSHUP 10.240.20.59 | 10.10.1.19
I want select only 1st part of data which is before the pipe