Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    6

    Unanswered: NVL , isNuLL equivalent in DB2

    I have SQL like

    select columnname from table t order by NVL(columnname, ' ') ASC

    Above query for oracle fetches the null 'columnname' first. Similarly we use isNull() function for SQL Server.

    Please let me know the equivalent function in DB2.

    NULLIF does not serve my purpose

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: NVL , isNuLL equivalent in DB2

    coalesce

    This has been discussed earlier .. A search for NVL would have given you the answer

    Sathyaram

    Originally posted by vinbie
    I have SQL like

    select columnname from table t order by NVL(columnname, ' ') ASC

    Above query for oracle fetches the null 'columnname' first. Similarly we use isNull() function for SQL Server.

    Please let me know the equivalent function in DB2.

    NULLIF does not serve my purpose
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •