How do I rename null values found in GROUP BY column?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jt

    How do I rename null values found in GROUP BY column?

    Here's a sample result from the following statement:

    select dept, sum(cost)
    from dept
    group by dept;

    dept sum(cost)
    ---- --------
    null 1000
    200 20
    300 100

    Is there a way I can rename the null value to some other value?
  • nobody

    #2
    Re: How do I rename null values found in GROUP BY column?

    look at nvl function

    "jt" <judiphuongtu@y ahoo.comwrote in message
    news:6f38222f.0 308250751.27404 fdb@posting.goo gle.com...
    Here's a sample result from the following statement:
    >
    select dept, sum(cost)
    from dept
    group by dept;
    >
    dept sum(cost)
    ---- --------
    null 1000
    200 20
    300 100
    >
    Is there a way I can rename the null value to some other value?

    Comment

    Working...