Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    10

    Question Unanswered: null indicators?

    hi,

    I have a stored procedure which selects from the database
    table into local variables. Is there a way to set some indicator
    local variables during select to mark if particular field fetched
    from database is NULL, without having to do it by
    IF-THEN-ELSE logic? (like in Oracle)

    thx,
    bran

  2. #2
    Join Date
    Jun 2002
    Posts
    10
    Also, if indicator variables can be used, can the local variable be
    set automatically to some default value when the indicator variable is < 0?

  3. #3
    Join Date
    Aug 2002
    Location
    Bonn/Germany
    Posts
    152
    No, indicator variables are not supported in stored
    procedures, only in esql/c.

    But you might use the nvl() function like this:

    select nvl(<colname>, '<substitute_value'>)
    from <table_name>

    This allows you to substitute null values directly in
    the select statement.

    Best regards

    Eric
    --
    IT-Consulting Herber
    WWW: http://www.herber-consulting.de
    Email: eric@herber-consulting.de

    ***********************************************
    Download the IFMX Database-Monitor for free at:
    http://www.herber-consulting.de/BusyBee
    ***********************************************

Posting Permissions

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