SQL Language (MOSC)

MOSC Banner

Don't show slash if column is null

edited Dec 26, 2015 1:57AM in SQL Language (MOSC) 13 commentsAnswered ✓

I have statement like this

select  'xx'   || ' / ' ||  'yy'  || ' / ' || 'zz'   as com from dual ;

the output obviously is

xx / yy / zz

the problem is  if XX is null , then the output is

/ yy / zz

if zz too is null , the the output is / yy /


How not to show the slash /   in these situations ?


Best Regards

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center