Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Posts
    35

    Wink Unanswered: What is the equivalent function for isnull in db2?

    Hi All,
    I want to know the equivalent function for isnull in db2
    In oracle we can use isnull in predicated for fetching the null values, but we dont have same function in db2? is anyother way to fetch null values through any db2 function.

    udb v8.1 in solaris

    if any one know please let me know.
    thanks
    kumar

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

    Re: What is the equivalent function for isnull in db2?

    ISNULL, I believe is in SQL Server and Sybase ...

    NVL is Oracle function

    and

    COALESCE is the equivalent DB2 function .

    To clarify, COALESCE(col1,col2) returns col2 if col1 is null or col1 is col1 is not null ...

    If I have misunderstood , then ...

    If you want to fetch the rows if a column col1 has null values , then
    WHERE COL1 IS NULL




    Originally posted by nmkumaran
    Hi All,
    I want to know the equivalent function for isnull in db2
    In oracle we can use isnull in predicated for fetching the null values, but we dont have same function in db2? is anyother way to fetch null values through any db2 function.

    udb v8.1 in solaris

    if any one know please let me know.
    thanks
    kumar
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Mar 2003
    Posts
    35

    Talking Re: thanks a lot

    Thanks a lot.


    Originally posted by sathyaram_s
    ISNULL, I believe is in SQL Server and Sybase ...

    NVL is Oracle function

    and

    COALESCE is the equivalent DB2 function .

    To clarify, COALESCE(col1,col2) returns col2 if col1 is null or col1 is col1 is not null ...

    If I have misunderstood , then ...

    If you want to fetch the rows if a column col1 has null values , then
    WHERE COL1 IS NULL

Posting Permissions

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