is not null

  • How do you display a value that is not null?

  • Don't understand the question.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Not enough info in your post to know for sure but here are some hints for you...

    WHERE SomeColumn IS NOT NULL

    or

    SELECT SomeColumnAlias = ISNULL(SomeColumn,SomeNotNullValue or Column)

    or

    SELECT SomeColumnAlias = COALESCE(SomeColumn,SomeNotNullValue or Column)

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • If you have to pull data from an existing query that has null values, how do only display values that is not null? I've tried using the field value.ToString.Length > 0 but the IIF statement requires 3 parameters on what to display if it's null. I tried working with the visibility but it holds the record balnk space.

  • Well, what do you want to happen if a value is null?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I don't want to display it. It's holding a blank line.

  • Not following.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I would do this in the dataset with a WHERE clause. If you can't or won't do that then put a filter on the tablix to do the same thing.

  • Have you tried this?

    If you are using a table to display the field values then give it a try,

    In the row visibility add this code : =iif(IsNothing(Fields!DataSetColumnName.Value),true,false)

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply