I have this sample temp table. I was using the COALESCE in SQL sever. I do not have access right to create tableS in Oracle. Is there a Case statement in Oracle that works as COALESCE in SQL server?
CREATE TABLE #TEMP
(
ID INT,
FIELD1 VARCHAR (5),
FIELD2 VARCHAR (5),
FIELD3 VARCHAR (5)
)
INSERT INTO #TEMP VALUES('555','CVS','E','CIA')
SELECT
ID,
COALESCE(FIELD1 + '_' + FIELD2 + '_' + FIELD3, FIELD2 + '_' + FIELD1) AS STORE
FROM #TEMP
Basically, I want to replace the COALESCE from above my query to Case Statement in Oracle.
edit: I did use this Field1 ||'_' ||Field2||'_'||Field3 AS Store
in Oracle but the result gives me the extra underscore _
from Field3 which I don't want to see the underscore.