locked
How can I convert Nulls in view RRS feed

  • Question

  • User709978785 posted

    Is it possible to convert all nulls in all columns of a view to something other than null?

    Friday, October 17, 2008 7:12 PM

Answers

  • User1281381861 posted

    Hi,Jackxxx

     Here the case is taht if column name is null then it should be converted to ''

     

    U can do that

    select coalesce(columnname1,''),coalesce(columnname1,''),coalesce(columnname1,'').....from TestTable

     

     

    PLZ MARK AS ANSWER IF IT HELP U.

    THANKS.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 18, 2008 12:22 AM

All replies

  • User-1939929478 posted

     IN the query for your view for each column do this

    SELECT ISNULL(myid,0)
    FROM MyTable

     where myid is a column name and 0 is the value that will get selected if myid is null

     

    Friday, October 17, 2008 7:41 PM
  • User1588207957 posted

    Even You can do it in the UI, depends on which control you are using. in case of grid using its "NullDisplayText"

    Friday, October 17, 2008 8:06 PM
  • User1281381861 posted

    Hi,Jackxxx

     Here the case is taht if column name is null then it should be converted to ''

     

    U can do that

    select coalesce(columnname1,''),coalesce(columnname1,''),coalesce(columnname1,'').....from TestTable

     

     

    PLZ MARK AS ANSWER IF IT HELP U.

    THANKS.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, October 18, 2008 12:22 AM