Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005

    Unanswered: null indicator for character fields

    how to indicate presence of null value to sybase server, for var char fields, just like isnull for numeric fields. The absence of this cause sybase server to throw error message The data for col is null but no indicator was available.

  2. #2
    Join Date
    Dec 2005
    you should be able to use isnull for char/varchar as can try like this

    if isnull(@charvrbl, '') = ''
    print "charvrbl is null"

    please note it's not a double quote but two single quotes & we're checking for null condition for char variable & if true we compare two single quotes which would resolve to true condition & would display the print statement.

    you can also use -

    if @charvrbl is null
    print "true"

    which would tell whether it's nullable or not. Hope this is helpful and this was what you were looking for.

Posting Permissions

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