PL/SQL (MOSC)

MOSC Banner

How to get a space when it is null?

in PL/SQL (MOSC) 14 commentsAnswered

Hello there,

One more question on sql output.

We have a column with values and nulls. The requirement from Treasury is to return the values or a space for the null. I used followings:

NVL(ColumnA, ' ') --- not '' but with a space

to_char (NVL(ColumnA, ' '))  -- I tried to force a space there

Both give me a space when it is null in sql output when I export the output to text file.

However, in our Oracle concurrent output, it gives me nothing when it is null, not a space when I save it to or copy/paste to a text file.

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