Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    2

    Unanswered: NULLs and Empties

    I've got a nice task of troubleshooting a report in word, data is taken from the database this way:
    Code:
    ISNULL(bCountry + ', ', ' ') +  ISNULL(bAddr_Region + ', ', ' ') + ISNULL(bAddr_okrug + ', ', ' ') + ISNULL(bAddr_City , ' ')
    when 'bAddr_Region' and 'bAddr_okrug' are blank, result looks like this:
    Country, , , City

    that's because the program writes empty values to the table, not NULLs..

    how do i check whether value is empty in the statement above?

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    ISNULL(NULLIF(bCountry, '') + ', ', ' ') +  ISNULL(NULLIF(bAddr_Region, '') + ', ', ' ')
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Apr 2008
    Posts
    2
    it works!
    thank you!)

Posting Permissions

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