Oracle建立全球化支持环境

时间:2022-10-18 23:35:37

We want to set this SET NUMFORMAT 99999999999999999.00 at the user/schema level, for all sessions. Currently ,when set this command , it is getting applicable for that session only. Can we do this globally , so that when ever we open the connection , this works >

我们希望在用户/架构级别为所有会话设置此SET NUMFORMAT 99999999999999999.00。目前,设置此命令时,它仅适用于该会话。我们可以在全球范围内这样做,这样当我们打开连接时,这可以工作>

1 个解决方案

#1


0  

SET NUMFORMAT is a SQL*Plus command. In general, it is a client-side setting to display the number.

SET NUMFORMAT是一个SQL * Plus命令。通常,显示数字是客户端设置。

You could always store the SQL*Plus settings in login.sql and glogin.sql. Whenever SQL*Plus starts up, it looks for a file named glogin.sql under the directory $ORACLE_HOME/sqlplus/admin. If such a file is found, it is read and the containing statements are executed. Additionally, after reading glogin.sql, sql*plus also looks for a file named login.sql in the directory from where SQL*Plus was and in the directory that the environment variable SQLPATH points to and reads it and executes it. Settings from the login.sql take precedence over settings from glogin.sql.

您始终可以在login.sql和glogin.sql中存储SQL * Plus设置。每当SQL * Plus启动时,它会在$ ORACLE_HOME / sqlplus / admin目录下查找名为glogin.sql的文件。如果找到这样的文件,则读取它并执行包含的语句。此外,在读取glogin.sql之后,sql * plus还在SQL * Plus所在的目录中以及环境变量SQLPATH指向的目录中查找名为login.sql的文件,并读取并执行它。 login.sql中的设置优先于glogin.sql中的设置。

If you are just displaying the number, and want it to be displayed in desired format, then use TO_CHAR at individual SQL statement level.

如果您只是显示数字,并希望以所需格式显示,则在单个SQL语句级别使用TO_CHAR。

For example,

例如,

SQL> select to_char(123.456,'999.9') VALUE from dual
  2  /

VALUE
------
 123.5

Bottomline, this is a SQL*Plus command, not an Oracle SQL or PL/SQL command. This will only affect how the data is displayed from SQL*Plus, not from other programs that access the database. There should be something similar in whatever you are using to display your data instead of SQL*Plus.

Bottomline,这是一个SQL * Plus命令,而不是Oracle SQL或PL / SQL命令。这只会影响SQL * Plus中数据的显示方式,而不会影响访问数据库的其他程序。无论您使用什么来显示数据而不是SQL * Plus,都应该有类似的东西。

#1


0  

SET NUMFORMAT is a SQL*Plus command. In general, it is a client-side setting to display the number.

SET NUMFORMAT是一个SQL * Plus命令。通常,显示数字是客户端设置。

You could always store the SQL*Plus settings in login.sql and glogin.sql. Whenever SQL*Plus starts up, it looks for a file named glogin.sql under the directory $ORACLE_HOME/sqlplus/admin. If such a file is found, it is read and the containing statements are executed. Additionally, after reading glogin.sql, sql*plus also looks for a file named login.sql in the directory from where SQL*Plus was and in the directory that the environment variable SQLPATH points to and reads it and executes it. Settings from the login.sql take precedence over settings from glogin.sql.

您始终可以在login.sql和glogin.sql中存储SQL * Plus设置。每当SQL * Plus启动时,它会在$ ORACLE_HOME / sqlplus / admin目录下查找名为glogin.sql的文件。如果找到这样的文件,则读取它并执行包含的语句。此外,在读取glogin.sql之后,sql * plus还在SQL * Plus所在的目录中以及环境变量SQLPATH指向的目录中查找名为login.sql的文件,并读取并执行它。 login.sql中的设置优先于glogin.sql中的设置。

If you are just displaying the number, and want it to be displayed in desired format, then use TO_CHAR at individual SQL statement level.

如果您只是显示数字,并希望以所需格式显示,则在单个SQL语句级别使用TO_CHAR。

For example,

例如,

SQL> select to_char(123.456,'999.9') VALUE from dual
  2  /

VALUE
------
 123.5

Bottomline, this is a SQL*Plus command, not an Oracle SQL or PL/SQL command. This will only affect how the data is displayed from SQL*Plus, not from other programs that access the database. There should be something similar in whatever you are using to display your data instead of SQL*Plus.

Bottomline,这是一个SQL * Plus命令,而不是Oracle SQL或PL / SQL命令。这只会影响SQL * Plus中数据的显示方式,而不会影响访问数据库的其他程序。无论您使用什么来显示数据而不是SQL * Plus,都应该有类似的东西。