My Oracle Support Banner

SQL SELECT Query Submitted Via Weblogic Datasource Returns Number With Different Formats. (Doc ID 1682994.1)

Last updated on NOVEMBER 14, 2018

Applies to:

Oracle WebLogic Server - Version and later
Information in this document applies to any platform.


SQL SELECT query executed as below returns the number with different formats eg on WLS Server A 1,234.56 and on Weblogic Server B 1.234,56

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
props.put(Context.PROVIDER_URL, "t3://localhost:7001");
props.put(Context.SECURITY_PRINCIPAL, "weblogic");
props.put(Context.SECURITY_CREDENTIALS, "welcome1");
Context initContext = new InitialContext(props);

DataSource datasource = (javax.sql.DataSource) initContext.lookup("jdbc/scottV12gds");
Connection conn = datasource.getConnection();

Statement stmt = conn.createStatement();
stmt.execute("select 123456/10 from dual");

 How to force the format number to eg 1.234,56 ?



To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.