SAP Knowledge Base Article - Preview

3206803 - The session level option is not working when using it with execute statement - SAP ASE

Symptom

The result of this script is different if the 'execute' statement is used or not used.

  • script 1
       
    set ansinull on
    if (object_id("abc") = NULL)
    begin
    print "OBJECT NOT FOUND"
    end
    else
    begin
    print "OBJECT FOUND"
    end
    go

    OBJECT FOUND
       
  • script 2
       
    execute ('set ansinull on')
    if (object_id("abc") = NULL)
    begin
    print "OBJECT NOT FOUND"
    end
    else
    begin
    print "OBJECT FOUND"
    end
    go

    OBJECT NOT FOUND


Read more...

Environment

SAP Adaptive Server Enterprise (ASE) 

Product

SAP Adaptive Server Enterprise 16.0

Keywords

KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.