Executing a Dynamic Statement in a Pro*C Client ALTER SESSION is not Taken Into Account (Doc ID 352513.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 and later   [Release: 10.2 and later ]
Precompilers - Version: 10.2 and later ]
Information in this document applies to any platform.
***Checked for relevance on 23-Apr-2010***

Symptoms

In a 10.2.0 Pro*C program the "alter session set NLS_DATE_FORMAT" doesn't work, when the "alter session set NLS_DATE_FORMAT" is executed in a dynamic statement

e.g.

ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS
select sysdate from dual in a C Host variable declared as "char"

returns
DATE: --15-NOV-05--

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms